Is It a Problem?
Usually not; it was zero on our SQL Server 2025 lab. Get Wait Statistics does not filter it out, so if it ranks, you will see it. It has two known ways of getting large: the server running out of virtual address space, and an out-of-memory bug when that address space runs low, fixed for SQL Server 2012 in Microsoft’s article KB3074434 and for 2014, 2016 and 2017 in KB4077105.
What It Means
Microsoft lists it as internal use only, from SQL Server 2012. It is waiting for a section of the memory allocator that only one thread can run at a time, the code that takes memory from the buffer pool for other uses, such as a sort.
When It Does Matter
If it is sustained, check two things. First the build: on SQL Server 2012 to 2017, make sure the fix is in (2012 SP3 CU8, 2014 SP2 CU10, 2016 SP1 CU8, 2017 CU4) and that trace flag 8075 is set as a startup parameter, which both fixes need before they take effect. Second, the address space: when the process runs short, large allocations take a long time to find room, and this wait grows. sys.dm_os_process_memory shows it:
SELECT
physical_memory_in_use_kb / 1024 AS physical_memory_in_use_mb,
virtual_address_space_committed_kb / 1024 AS vas_committed_mb,
virtual_address_space_available_kb / 1024 AS vas_available_mb,
process_physical_memory_low,
process_virtual_memory_low
FROM sys.dm_os_process_memory;
The baseline to monitor is process_virtual_memory_low staying at 0. If it flips to 1, look at what is loaded into the SQL Server process, such as in-process OLE DB providers and extended stored procedures, and move them out of process where you can. It needs VIEW SERVER STATE.
The SOS Family
These are SQLOS waits, the layer that schedules threads and hands out memory inside SQL Server. Most are internal synchronisation that never needs attention. The one that usually matters is the main page, SOS_SCHEDULER_YIELD.
- SOS_SCHEDULER_YIELDCPU yield. A thread giving up the scheduler after its quantum and waiting to run again.The main page for this family
- SOS_WORK_DISPATCHERIdle threads. A SQLOS thread waiting to be given work, from SQL Server 2019.Usually noise
- SOS_DISPATCHER_MUTEXDispatcher pools. Internal synchronisation of a dispatcher pool, including when it is resized.Usually noise
- SOS_SYNC_TASK_ENQUEUE_EVENTSynchronous task start. A task started synchronously, waiting until it begins running.Usually noise
- SOS_MEMORY_TOPLEVELBLOCKALLOCATORLarge allocations. The allocator that takes large blocks of memory from the buffer pool.Usually noise. This page.
- SOS_PHYS_PAGE_CACHEPhysical pages. The mutex around allocating physical pages from, and returning them to, the operating system.Worth a look when it climbs
- SOS_WORKER_MIGRATIONWorker moves. Undocumented; associated with workers moving between schedulers.Usually noise
Where To Go Next
SOS_MEMORY_TOPLEVELBLOCKALLOCATOR is background noise on a healthy instance. If you are chasing a real problem, start with the waits that cost you time.
- The waits that usually matter, ranked, with what each one is telling you.
- SOS_SCHEDULER_YIELD, the SQLOS wait that usually matters, CPU pressure.
- Performance & Troubleshooting, the scripts and guides for this part of the stack.
Leave a Reply