[NTLUG:Discuss] Disk I/O timings.

Dan Carlson dmcarlsn at yahoo.com
Wed Dec 5 09:39:38 CST 2001


I don't know how to control or disable the kernel's caching.  You can use
hdparm to control the drive's caching and readahead.  Use the -A option to
enable/disable readahead.  Use the -f option to flush the drive's cache.
Most IDE drives I've seen lately only have a 1 to 2 MB cache, so the
kernel's caching will likely be a much bigger factor than the drive's
caching.

If you haven't already done so, use hdparm to optimize your drives
performance by enabling 32-bit I/O (-c1) and DMA (-d1), if your controllers
and drives support them.  I've noticed that many distributions either do
nothing in this regard, or they don't get it right, so it's well worth
looking into yourself.  You can use the -X option to force a drive into a
particular DMA mode.

Dan Carlson

----- Original Message -----
From: "Steve Baker" <sjbaker1 at airmail.net>
To: "NTLUG DISCUSS" <discuss at ntlug.org>
Sent: Tuesday, December 04, 2001 10:40 PM
Subject: [NTLUG:Discuss] Disk I/O timings.


> ...
> Is there a means to ask the kernel to erase the contents of it's disk
cache?
>
> I thought of un-mounting the drive that the file is on and re-mounting
it - that
> ought to invalidate the kernel's cache - but it's very inconvenient.  Is
there a
> better way?
>
> I also realise that there is a RAM cache on the disk drive itself - does
that
> ever get filled speculatively by the drive (or the kernel) ?
> ...






More information about the Discuss mailing list