Why the Processor Queue Is Always Empty

We haven't talked about all Processor counters yet, but if we're going to talk about gotchas, we might as well come clean now. The Processor Queue Length is a measure of the number of threads ready and waiting to execute program instructions when there is no free processor. Because there is only one such queue, the counter belongs to the System object (as opposed to each processor object).

You might be watching a uniprocessor system with lots of threads running and be disappointed to see that the Processor Queue Length counter is always zero. The reason is that in Windows NT, this counter is measured by counting ready threads. This cannot be done unless you also select at least one thread for measurement. Once you include some counter from some thread in your measurement, the count for the Processor Queue Length will be valid. This is mentioned in the Explain text for the Processor Queue Length, but this is a very important counter and a pretty subtle wart, so we thought we'd better tell you.