Re: clearing filesystem cache for I/O benchmarks

From: Hans Reiser
Date: Tue Jul 27 2004 - 02:21:29 EST


Andrew Morton wrote:

(Please don't remove people from the email recipient list when doing kernel
work.)

Benjamin Rutt <rutt.4+news@xxxxxxx> wrote:


Andrew Morton <akpm@xxxxxxxx> writes:



Benjamin Rutt <rutt.4+news@xxxxxxx> wrote:


How can I purge all of the kernel's filesystem caches, so I can trust
that my I/O (read) requests I'm trying to benchmark bypass the kernel
filesystem cache?


Either delete the benchmark test files or


I'm not sure I follow. If I delete the benchmark files, I'll only
need to create them again later in order to do a read test, and I'll
have the same problem then, of how to eliminate the just-written-data
from cache.


when benchmarking, please be careful that you don't end up benchmarking umount/mount, or sync, or..... it can be remarkably hard to avoid such mistakes.....

I tend to try to use large enough filesets that small things like cache flush happenstance or bitmap loading overhead do not sway the benchmark.

Rebooting tends to work for resetting the OS thoroughly, though I would be curious to hear comments on whether one ought to power down the disk drive so that its cache flushes......;-)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/