If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Disabling disk cache?
Is it possible to disable hardware disk cache? Not the software cache.
I can read files with no software cache, opening them without buffering (FILE_FLAG_NO_BUFFERING) but I can't avoid the hardware cache. Is it possible to get the hardware disk cache size? Or even disable it? Thanks a lot. |
#2
|
|||
|
|||
|
#3
|
|||
|
|||
All SCSI disks support disabling the on-drive cache (and most disks
also support bypassing it for individual reads or writes). Some newer IDE disks support disabling the on-drive cache. I'm not aware of any operating systems which make it easy to change these settings or use the bypasses. NTFS uses bypasses (FUA bit) for metadata writes. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation http://www.storagecraft.com |
#4
|
|||
|
|||
Anton Rang writes:
[...] I'm not aware of any operating systems which make it easy to change these settings or use the bypasses. If it's a SCSI drive there may be a SCSI command to achieve this. Many Unix operating systems have some kind of mechanism for sending SCSI commands. -- David Magda dmagda at ee.ryerson.ca, http://www.magda.ca/ Because the innovator has for enemies all those who have done well under the old conditions, and lukewarm defenders in those who may do well under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI |
#5
|
|||
|
|||
"Maxim S. Shatskih" writes:
All SCSI disks support disabling the on-drive cache (and most disks also support bypassing it for individual reads or writes). Some newer IDE disks support disabling the on-drive cache. I'm not aware of any operating systems which make it easy to change these settings or use the bypasses. NTFS uses bypasses (FUA bit) for metadata writes. That's good to know. Actually I meant my statement to be parsed as "...which make it easy to .... use the bypasses." Is there a way to request that FUA be used for user writes? That would be handy for, e.g., a database application which wants to force ordering of writes. -- Anton |
#6
|
|||
|
|||
"Anton Rang" wrote in message ... "Maxim S. Shatskih" writes: All SCSI disks support disabling the on-drive cache (and most disks also support bypassing it for individual reads or writes). Some newer IDE disks support disabling the on-drive cache. I'm not aware of any operating systems which make it easy to change these settings or use the bypasses. NTFS uses bypasses (FUA bit) for metadata writes. That's good to know. Actually I meant my statement to be parsed as "...which make it easy to ... use the bypasses." Is there a way to request that FUA be used for user writes? That would be handy for, e.g., a database application which wants to force ordering of writes. It would certainly make sense for the 'write-through' or 'no buffering' CreateFile options to use FUA when it was available, but I don't know that they do. I'm pretty sure that Win2K allows you to disable an IDE disk's write-back cache, though (though my impression is that not all IDE disks may honor the request; some certainly do). - bill |
#7
|
|||
|
|||
Is there a way to request that FUA be used for user writes? That would
be handy for, e.g., a database application which wants to force ordering of writes. According to FASTFAT source from the IFS kit, the metadata is always written with FUA on. To use FUA in a user file write, specify FILE_FLAG_WRITE_THROUGH in CreateFile. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation http://www.storagecraft.com |
#8
|
|||
|
|||
It would certainly make sense for the 'write-through' or 'no buffering'
CreateFile options to use FUA when it was available, but I don't know that they do. FILE_FLAG_WRITE_THROUGH. I'm pretty sure that Win2K allows you to disable an IDE disk's write-back cache IIRC IDE has some terrifying lameness with a cache. IDE protocol does not support the per-request FUA flag, so, I will not be surprised if the IDE driver will issue write+flush in case of incoming request with the FUA bit. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation http://www.storagecraft.com |
#9
|
|||
|
|||
this. Many Unix operating systems have some kind of mechanism for
sending SCSI commands. Windows also has IOCTL_SCSI_PASSTHROUGH. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation http://www.storagecraft.com |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot boot from secondary hard disk (bios setup) | Ian | Compaq Computers | 1 | January 5th 05 10:13 PM |
Sudden slow down in performance using some programs, disk cache problem? | DS | Asus Motherboards | 1 | September 30th 04 01:01 PM |
P4S333 hard drive capacity | Katy | Asus Motherboards | 6 | September 19th 04 04:26 AM |
48-bit LBA Support - HDs Over 137GB - Advice? | Rob Jones | Asus Motherboards | 16 | November 30th 03 12:20 PM |
P4C800 reports wrong disk sizes, free space in WinXP - Help please | Olav | Asus Motherboards | 1 | October 30th 03 12:02 AM |