How to determine how busy a disk/volume is?

Hi,

I’m writing a minifilter that in certain situations would like to defer some file operations until a later time. I can use a timer thread to do this, but when the (repetitive) timer expires, I’d like to be able to determine how busy the target disk/volume is, and if it is presently rather busy, then I’d like to defer the file operations until the next “timer tick”.

Is there any way from within a (minifilter) driver, to determine how busy a target disk/volume is?

(e.g. perhaps by checking the number of I/O requests queued to the volume? Or, I could implement my own crude measure by counting the number of [certain types of] IRPs processed in each time period and comparing the count for the current period to the maximum seen count)

Thanks for all advice.

Regards,

David

Hi,

I think only the filter in the disk’s stack may report about the load. See
the diskperf example in the DDK.


Slava Imameyev, xxxxx@hotmail.com

wrote in message news:xxxxx@ntfsd…
> Hi,
>
> I’m writing a minifilter that in certain situations would like to defer
> some file operations until a later time. I can use a timer thread to do
> this, but when the (repetitive) timer expires, I’d like to be able to
> determine how busy the target disk/volume is, and if it is presently
> rather busy, then I’d like to defer the file operations until the next
> “timer tick”.
>
> Is there any way from within a (minifilter) driver, to determine how busy
> a target disk/volume is?
>
> (e.g. perhaps by checking the number of I/O requests queued to the volume?
> Or, I could implement my own crude measure by counting the number of
> [certain types of] IRPs processed in each time period and comparing the
> count for the current period to the maximum seen count)
>
> Thanks for all advice.
>
> Regards,
>
> David
>

> (e.g. perhaps by checking the number of I/O requests queued to the volume?

Then maintain this counter yourself.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

If you do not want to write the disk filter, you can count read and write
IRPs with IRP_NOCACHE or IRP_PAGING_IO or IRP_SYNCHRONOUS_PAGING_IO flags.
This assumes that FSD uses the cache for all other requests and doesn’t take
into account requests from the FSD and underlying filters.


Slava Imameyev, xxxxx@hotmail.com

wrote in message news:xxxxx@ntfsd…
> Hi,
>
> I’m writing a minifilter that in certain situations would like to defer
> some file operations until a later time. I can use a timer thread to do
> this, but when the (repetitive) timer expires, I’d like to be able to
> determine how busy the target disk/volume is, and if it is presently
> rather busy, then I’d like to defer the file operations until the next
> “timer tick”.
>
> Is there any way from within a (minifilter) driver, to determine how busy
> a target disk/volume is?
>
> (e.g. perhaps by checking the number of I/O requests queued to the volume?
> Or, I could implement my own crude measure by counting the number of
> [certain types of] IRPs processed in each time period and comparing the
> count for the current period to the maximum seen count)
>
> Thanks for all advice.
>
> Regards,
>
> David
>