A computer components & hardware forum. HardwareBanter

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.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Storage & Hardrives
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Disabling disk cache?



 
 
Thread Tools Display Modes
  #1  
Old October 26th 03, 04:07 PM
Nuno Magalhaes
external usenet poster
 
Posts: n/a
Default 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.
  #3  
Old October 27th 03, 06:38 PM
Maxim S. Shatskih
external usenet poster
 
Posts: n/a
Default

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  
Old October 27th 03, 11:47 PM
David Magda
external usenet poster
 
Posts: n/a
Default

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  
Old October 28th 03, 07:30 PM
Anton Rang
external usenet poster
 
Posts: n/a
Default

"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  
Old October 29th 03, 12:30 AM
Bill Todd
external usenet poster
 
Posts: n/a
Default


"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  
Old October 30th 03, 10:23 AM
Maxim S. Shatskih
external usenet poster
 
Posts: n/a
Default

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  
Old October 30th 03, 10:38 AM
Maxim S. Shatskih
external usenet poster
 
Posts: n/a
Default

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  
Old October 30th 03, 10:31 PM
Maxim S. Shatskih
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot boot from secondary hard disk (bios setup) Ian Compaq Computers 1 January 5th 05 11: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 01:20 PM
P4C800 reports wrong disk sizes, free space in WinXP - Help please Olav Asus Motherboards 1 October 30th 03 01:02 AM


All times are GMT +1. The time now is 12:57 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.