Windows – How is average disk queue length retrieved via WMI computed

hard drivewindowswmi

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?

Best Answer

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 ;-).

JR