Disabling Win2000 disk cache

All,

Is there way to disable disk read/write cache in Win2000 in allowing
file transfer to determine the true disk read/write throughput? I am using
DOS box to do simple file copy, and immediate read back the file copied
for determining throughput, and believes that the file read back is
reading from the Windows cache, but not reading back from the disk. Is
there anyway to disable the cache? There is disk write cache option, but
that only applies to the harddisk internal write cache. Your help is
greatly appreciated.

best regards,
Pteng

take a look at FILE_FLAG_NO_BUFFERING flag, see CreateFile for
reference.

Best regards,
Andrey mailto:xxxxx@sandy.ru

PT> All,

PT> Is there way to disable disk read/write cache in Win2000 in allowing
PT> file transfer to determine the true disk read/write throughput? I am using
PT> DOS box to do simple file copy, and immediate read back the file copied
PT> for determining throughput, and believes that the file read back is
PT> reading from the Windows cache, but not reading back from the disk. Is
PT> there anyway to disable the cache? There is disk write cache option, but
PT> that only applies to the harddisk internal write cache. Your help is
PT> greatly appreciated.

PT> best regards,
PT> Pteng

PT> —
PT> You are currently subscribed to ntdev as: xxxxx@sandy.ru
PT> To unsubscribe send a blank email to %%email.unsub%%

Open the file for non cached IO.

----- Original Message -----
From: “Peter Teng”
To: “NT Developers Interest List”
Sent: Friday, August 02, 2002 6:22 PM
Subject: [ntdev] Disabling Win2000 disk cache

> All,
>
> Is there way to disable disk read/write cache in Win2000 in allowing
> file transfer to determine the true disk read/write throughput? I am using
> DOS box to do simple file copy, and immediate read back the file copied
> for determining throughput, and believes that the file read back is
> reading from the Windows cache, but not reading back from the disk. Is
> there anyway to disable the cache? There is disk write cache option, but
> that only applies to the harddisk internal write cache. Your help is
> greatly appreciated.
>
> best regards,
> Pteng
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>

FILE_FLAG_NO_BUFFERING to CreateFile will disable the OS’s file cache
use for this handle.

Nevertheless, the disk’s (and possibly controller’s - such stupidities
are still done IIRC) hardware cache will be still in place. But do you
need disabling them in your meter app? Doubts.

Max

----- Original Message -----
From: “Peter Teng”
To: “NT Developers Interest List”
Sent: Friday, August 02, 2002 7:22 PM
Subject: [ntdev] Disabling Win2000 disk cache

> All,
>
> Is there way to disable disk read/write cache in Win2000 in
allowing
> file transfer to determine the true disk read/write throughput? I am
using
> DOS box to do simple file copy, and immediate read back the file
copied
> for determining throughput, and believes that the file read back is
> reading from the Windows cache, but not reading back from the disk.
Is
> there anyway to disable the cache? There is disk write cache option,
but
> that only applies to the harddisk internal write cache. Your help is
> greatly appreciated.
>
> best regards,
> Pteng
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>