Re: disk benchmarks & linux

Martin von Loewis (
Sun, 14 Sep 1997 10:55:27 +0200

> So I'm polishing up yet another whizzy benchmark and I'm getting screwed,
> somewhat, by the fact that Linux doesn't have raw devices so the buffer
> cache can throw me off when I'm doing I/O on /dev/sda or something similar.
> Is there any way to force the data out of the cache other than to try and
> use up all of memory?

When you open a block device with O_SYNC, data is guaranteed to be on disk
before write(2) returns. AFAIK, there is no way to prevent read
caching on Linux.