[lug] inhibit caching

Zan Lynx zlynx at acm.org
Mon Jun 21 08:00:39 MDT 2004

On Mon, 2004-06-21 at 00:56, Steve SullivanSteveSullivan wrote:
> Often I need to run performance tests on a disk,
> but the file caching of Linux gets in the way.
> Is there a way to inhibit caching for a file
> or disk, so when the data are read they truly
> come from disk instead of from cache?

Look at the O_DIRECT flag.  Use it in your file or device open.  You
will want to read all about it, because it has many restrictions as to
what offsets and block sizes you can read with it.
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20040621/96597fd5/attachment-0001.pgp>

More information about the LUG mailing list