Re: disk benchmarks & linux

Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de)
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.

Regards,
Martin