RESOURCE_SEMAPHORE_SMALL_QUERY Wait Type in SQL Server

RESOURCE_SEMAPHORE_SMALL_QUERY is a wait on the small-query memory grant semaphore. SQL Server reserves a separate slice of grant memory for cheap queries so they never queue behind memory-hungry monsters. This wait means even that fast lane is congested: a small query could not get its modest grant immediately.

The engine caps the damage: if the small-query pool cannot serve the request within a few seconds, the request is transferred to the main grant pool, so individual waits here stay short by design.

Is It a Problem?

Its significance is what it implies about the bigger picture. The small-query lane only jams when there is an excessive volume of concurrent small grants, usually while the main pool is already blocked by queued big queries. So sustained RESOURCE_SEMAPHORE_SMALL_QUERY is a pressure gauge for the whole memory grant system: the main pool is in trouble, and the overflow is lapping into the fast lane.

Expect it to appear alongside plain RESOURCE_SEMAPHORE waits; alone it is rare and usually transient.

Common Causes

  • Main grant pool saturated by big sorts and hashes, backing everything up.
  • A storm of concurrent small-grant queries (high-frequency OLTP with sorts on modest row counts).
  • Overall memory pressure shrinking what is available for grants.
  • Oversized grants from bad estimates hogging the pools.

What To Do

  1. Look at the whole grant picture first: sys.dm_exec_query_memory_grants shows what is waiting, what is granted, and who holds the big reservations.
  2. Fix the big-grant offenders (missing indexes, stale statistics, unnecessary sorts); freeing the main pool unclogs the small lane too.
  3. Check max server memory and overall memory health so grants have room.
  4. On chronic mixed workloads, Resource Governor can carve grant limits per workload group.

How To See It

Rank it against everything else with Get-WaitStatistics, reading it together with RESOURCE_SEMAPHORE; the small-query variant is the confirmation that grant pressure has spread.


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

Comments

Leave a Reply

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