Sending Disk Commands

Honiewelle wrote:

So what do you guys recommend in getting a more accurate i/o timing in
a multi-threaded app? Other than getting the time before and after

What information are you actually trying to get? If you are trying to
find out how long a disk write takes, the answer is virtually no time at
all, because the write gets stored in a memory cache, which is then
scheduled for writing to the physical device later on, after your
application is running again. Is that cheating? In a sense, yes, but
that’s the time your application is actually going to see.

If you’re trying to do performance measurements on your disk, you can
turn off all of the buffering, but that’s not a real-world scenario.

If you know that your device finishes its I/O operations before it
completes the request, then even with overlapped I/O you just need to
time from just before the DeviceIoControl to just after the

Tim Roberts,
Providenza & Boekelheide, Inc.