Thursday 11 April 2013

Processor Queue Length on SQL2005 and above...

The processor queue length is becoming less important as a SQL Server performance metric since SQL 2005.

In SQL 2005 and above the SQL server does not queue its work to the Windows Op System, it now has a user mode scheduler which is where it queues tasks that are waiting.

The best way to view the number of tasks queued in SQL Server is to use the DMV sys.dm_os_schedulers:

SELECT AVG([runnable_tasks_count])
FROM [sys].[dm_os_schedulers]
WHERE [status] = 'VISIBLE ONLINE';

This should return zero, CPU pressure would show if this is NOT zero consistently.