PC Review


Reply
Thread Tools Rate Thread

Disabling disk cache?

 
 
Nuno Magalhaes
Guest
Posts: n/a
 
      26th Oct 2003
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.
 
Reply With Quote
 
 
 
 
Rod Speed
Guest
Posts: n/a
 
      26th Oct 2003

Nuno Magalhaes <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...

> Is it possible to disable hardware disk cache?


Presumably you mean the one on the physical drive itself.

Really depends on what you mean by disable. Any hard drive
has to have somewhere to store stuff when its been received
from the PC while waiting for the platters to rotate to the
correct position where the sector(s) its going to start to pass
under the heads and can be written to the platter surface.

In that sense the cache cant be disabled because thats a
very fundamental part of how a drive works, basic physics.

The cache in modern drives is also used for more than just
that tho. With writes some stuff is kept in the cache while
the platter rotation and head movement system puts the
heads over the appropriate part of the platter where its to go.
In that sense its obviously possible to minimise whats in the
cache and not have it filled up with quite a bit of pending stuff.
So its obviously possible to MINIMISE the use of the cache.

You might want to do that to minimise the risk to the data
if there is a power failure before the data is on the platter.

Same with reads. Most modern drives do tend to read
ahead of what they have requests for, when there is nothing
else to do, in case that data is requested later. Its obviously
possible to read more than just the sector requested from
a track in case the drive might get a request for following
data if the drive doesnt have any other ops pending. Then
the data can come out of the cache instead of having to
wait for the platters to rotate so the new requested sector
is under the head again. This read ahead is optional, but
there isnt really any point in being able to disable that.

Some drives do have some capacity to have the
detail of the use of the cache disabled by command.
One example is how the drive reports on a write.
The write can be acknowledged when its been received
into the cache, but not yet written to the platters. That
behaviour can be changed in the drive so it only reports
the write as having been complete once the data has
been written to the platters successfully. There is a sense
in which that last is disabling the write cache in effect even
tho the data still obviously goes thru the cache to the platters.

You generally have more control over the cache use with SCSI
drives than IDEs, but even say the Hitachi/IBM 180GPX drives
do allow control over how writes are reported cache wise.

> 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?


Not with most drives.

> Or even disable it?


In the sense of only reporting write complete once the
data has been successfully written to the platters, yes.

There is also a flush cache command.


 
Reply With Quote
 
Folkert Rienstra
Guest
Posts: n/a
 
      26th Oct 2003
"Nuno Magalhaes" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)
> 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?


Read and Write cache can be disabled by ATA Set Features command.

>
> Thanks a lot.



 
Reply With Quote
 
Eric Gisin
Guest
Posts: n/a
 
      27th Oct 2003
If it is a SCSI drive, you can issue SCSI commands with the SPTI ioctls. There
is a bit in read/write commands to disable caching.

For ATA you can disable write caching in device manager. There is also an
ioctl to send ATA commands. Look at the diskid32 program mentioned in another
thread.

"Nuno Magalhaes" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XPe and IE cache disabling =?Utf-8?B?TWlrZV9E?= Windows XP Embedded 0 4th Oct 2004 11:23 PM
How Do I clear the Disk Cache (Virtual Cache) in Windows XP ? Romy Sreedharan Microsoft C# .NET 2 22nd Sep 2004 05:31 PM
Disabling L1 L2 Cache John M. Hunt Asus Motherboards 6 12th Sep 2004 08:55 PM
Disabling disk cache? Nuno Magalhaes Computer Hardware 2 26th Oct 2003 11:08 PM
Disabling disk cache? Nuno Magalhaes Windows XP Hardware 0 26th Oct 2003 03:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:11 AM.