ATA disk performance (ICH2 controller), some tests
andcomparison with Linux 2.6.5
se at FreeBSD.org
Sun Sep 26 03:24:12 PDT 2004
On 2004-09-26 02:25 +0200, Mauro Triulzi <triulzi at freesurf.ch> wrote:
> -------Sequential Output-------- ---Sequential Input-- --Random--
> -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
> Machi MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
% FBSDa 1500 14533 12.8 14184 4.6 9360 3.2 27774 24.0 29067 5.7 119.1 0.6
% FBSDb 1500 27787 24.6 24690 8.3 12519 4.3 24487 21.4 24870 5.0 128.1 0.6
% Linux 1500 26859 97.7 59118 14.0 22480 8.1 22508 78.9 48501 9.0 177.1 0.5
[Table created from results on FreeBSD, FreeBSD after ATA reinit, and Linux.]
The difference between the test before and after the reinit appears relevant
and very disturbing. May be drive parameters (write cache enable?) are changed
be the reinit command, leading to significantly different write performance?
Different Bonnie versions use slightly different algortithms. You may want to
use the same version (perhaps even the same binary, since the Linux version
ought to run under emulation in FreeBSD). Linux used to cache much higher
numbers of dirty buffers than FreeBSD, which tried to keep that number low
for a number of reasons (e.g. to prevent to high a backlog of writes, but also
to avoid active program pages being flushed just to allow for dirty buffers).
You may want to test the raw throughput of your drive over the file systems
used for the tests. E.g. "dd if=/dev/DISK of=/dev/null bs=64k" with DISK set
to the FreeBSD device names of the file systems, where your bonnie test file
was placed in each case.
Running the same command under both FreeBSD and Linux should give identical
results, e.g. the 128MB root partition on my (not really idle) system:
# dd if=/dev/ad0s1a bs=64k of=/dev/null
2048+0 records in
2048+0 records out
134217728 bytes transferred in 2.223648 secs (60359249 bytes/sec)
Since modern file systems spread data all over the available partition, you
have to read the whole partition to get an average raw transfer speed.
Be aware, that file system tests (i.e. Bonnie) are highly dependent on the
amount of free space in the file system being tested, so if your FreeBSD and
Linux partitions had different sizes and amounts of free space, your values
aren't really significant ...
More information about the freebsd-current