FGCB_ADD_REMOVE Wait Type in SQL Server

Part of the SQL Server Wait Types Library.
Related deep dive: IO_COMPLETION Wait Type.


FGCB_ADD_REMOVE is a wait on the File Group Control Block, the structure that tracks the files in a filegroup. A thread needs it in exclusive mode whenever the file list changes or a file grows: autogrow events, adding or dropping files, and the round-robin allocation point moving between files. While one session grows a file, everyone else who needs an allocation in that filegroup queues here.

In practice, this wait is nearly always the smell of autogrowth happening during business hours.

Is It a Problem?

Yes, when it shows up with real wait time, because file growth is a stop-the-world event for allocations in that filegroup. Data file growth without instant file initialization zero-fills the new space, which can take seconds to minutes; log file growth always zero-fills. All of that time shows up as user queries mysteriously freezing.

Occasional tiny amounts (a well-sized file growing once a month) are not worth chasing.

Common Causes

  • Autogrowth events during peak workload, especially with percent-based growth on large files producing huge increments.
  • Instant file initialization not enabled, making every data file growth a zero-fill operation.
  • tempdb files growing under load because they were sized too small at startup.
  • Frequent small growth increments causing the wait to fire constantly instead of rarely.

What To Do

  1. Find the growth events: the default trace records them (our Get-AutogrowthHistory script reads this), including duration and which file grew.
  2. Pre-size data and log files to their expected size plus headroom, so autogrowth is an emergency backstop, not a routine event.
  3. Enable instant file initialization (the Perform volume maintenance tasks right) so data file growth is metadata-only. Note it never applies to log files.
  4. Set fixed-size growth increments appropriate to the file (for example 256MB to 1GB for busy data files), not percentages.
  5. Size tempdb properly at startup; it is rebuilt on every restart and grows from its configured size.

How To See It

Rank it against everything else with Get-WaitStatistics, then confirm with the autogrowth history: the timestamps of growth events will match your workload stalls.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *