Observing Processor Queue Length
The System\Processor Queue Length counter is a rough indicator of the number of threads each processor is servicing. The processor queue length, sometimes called processor queue depth, reported by this counter is an instantaneous value that is representative only of a current snapshot of the processor, so it is necessary to observe this counter over a long period of time. Also, the System\Processor Queue Length counter is reporting a total queue length for all processors, not a length per processor.
The optimal processor queue length can vary based on processor utilization or other factors as follows:
For busy systems that experience processor utilization in the 80 to 90 percent range and use thread scheduling, the queue length should range from one to three threads per processor. For example, on a four-processor (4P) system, the expected range of processor queue length on a system with high CPU activity is 4 to 12.
On systems with lower CPU utilization, the processor queue length is typically 0 or 1.
For systems running services that use fiber scheduling, such as Microsoft® SQL Server™ version 7.0, the typical processor queue length will range between 0 and 1, because there is a single thread on each processor that schedules fibers within the thread. (Fiber scheduling is enabled when the lightweight pooling option is selected.)
If the processor queue length exceeds the value recommended in the preceding list, it generally indicates that there are more threads than the current processor can service in an optimal way. Reducing the number of threads or providing more CPU power, either by adding processors or upgrading to faster processors, are optional methods of shortening the processor queue.
Figure 10.2 shows a long queue that has developed over time, as processors have been working at capacity.
Figure 10.2 Example of Long Queue at High Processor Usage
When you begin to see longer queues, monitor additional counters for DPC and interrupt activity, as described in the following sections.