Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using WMI to query the current and average disk queue length of remote machines to be able to monitor the load on the hard drive. The query is as follows:

    select CurrentDiskQueueLength, AvgDiskQueueLength, Name 
           from win32_perfformatteddata_perfdisk_physicaldisk

The results that I'm getting returned is confusing; I find that I am getting consistently (much!) higher total (i.e. for Name = _Total) results for average disk queue lengths compared to the current disk queue length. A graph of this is as follows:

alt text

where the purple line corresponds to the total average disk queue length and the green line corresponds to the current disk queue length.

And so my question: how is the average disk queue length computed? How can it be so much higher compared to the current disk queue length when I would assume that the average disk queue length is computed by taking several 'current' values in the past and taking the average of those? Does the average value depend on the frequency at which I run this query?

share|improve this question
Not an answer, but how often do you poll these values? Remember that a given average will take all value points into consideration whereas you're constructing a graph based on a few values. – chankster Jul 1 '09 at 12:40
Every five minutes. I accept that that is rather coarse-grained but I still don't understand how the average and current values can be so far apart. – jpoh Jul 1 '09 at 12:53

This does seem strange. If you use Perfmon to record the same data are the values that perfmon returns the same as your WMI script returns? If not it's a problem with WMI (or of course your script ;-).


share|improve this answer

When you ask for the current value you get the current queue length: nothing else. When you ask for the average you will get the queue length averag taken over what-ever period Windows uses.

If there was a sudden burst of activity (either a short very heavy burst, or a lower but longer one) between the two "current" readings you took that might be reflected in the average but, unless the burst of activity is happening right now, not in the current value at all.

It might be a little odd that you get consistent values for "current" even when the average is high for three or four readings, but as the current is sometimes higher than the average I would suggest that the readings are actually correct.

I'm not sure what the period used for the average is, but you might find it if you search for the exact counter name in the MSDN site.

share|improve this answer

Those values are not straightforward and meaningful. They have to be interpreted. From O'Reilly's Top 6 FAQs on Windows 2000 Disk Performance:

The Avg. Disk Queue Length counter is derived from the product of Avg. Disk sec/Transfer multiplied by Disk Transfers/sec, which is the average response of the device times the I/O rate. Again, this corresponds to a well-known theorem of Queuing Theory called Little's Law, which states:

N = A * Sr

where N is the number of outstanding requests in the system, A is the arrival rate of requests, and Sr is the response time. So the Avg. Disk Queue Length counter is an estimate of the number of outstanding requests to the (Logical or Physical) disk.

share|improve this answer
Linking off to a more detailed explanation is good, not summarizing it enough to be useful here...less so. – Scott Pack Mar 12 '11 at 2:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.