Re: clearing filesystem cache for I/O benchmarks

From: Hans Reiser
Date: Tue Jul 27 2004 - 13:09:52 EST


Benjamin Rutt wrote:

Hans Reiser <reiser@xxxxxxxxxxx> writes:



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 agree, I've made some blunders like that in the past. However for
write tests, we are including fsync() time, once, at the end of a file
write, since I feel it's unfair to trim that time.

fsync performance gives you different performance. Better to write more stuff to flush the cache.

Not including
fsync() time would only test the ability of the various parts of the
I/O systems to do write buffering. It's easy to do lots of write
buffering, if you buy enough memory. Forcing the disks to write is
the only fair way to compare writes between I/O systems.


It isn't fair. fsync is a different code path, and may be less efficient. Or more, depending on the fs. reiser4 is currently not well optimized for fsync, maybe next year I will change that but not this week....

Benchmarking well is hard.....

Hans
-
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/