Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2006 13:33:50 -0700 (PDT)
From:      Jason Stone <freebsd-performance@dfmm.org>
To:        Mark Bucciarelli <mark@gaiahost.coop>
Cc:        freebsd-performance@freebsd.org
Subject:   Re: Why are disk writes so slow?
Message-ID:  <20060926132742.Q2780@treehorn.dfmm.org>
In-Reply-To: <20060926154643.GA3064@rabbit>
References:  <20060926154643.GA3064@rabbit>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> As in his example (with a bufsize of 8192),
>
>    time ./a.out < 1.5M-testfile > /dev/null
>
> runs five times faster than (clock time)
>
>    time ./a.out < 1.5M-testfile > /a.out.out

a) your 1.5M-testfile is most likely still in the cache from previous test 
runs or from when you created it.

b) reading and writing to the same disk, you're going to thrash the disk 
with seeks.

so, some other experiments to try might include:

a) create a whole bunch of test files, reboot, and then make sure you use 
a different test file for every run.

b) try variations where you use a ramdisk for the read and disk for the 
write, then a disk for the read and a ramdisk for the write, and then a 
ramdsik for both.

c) try reading from /dev/zero and writing to disk as the converse of 
reading from disk and writing to /dev/null, etc.


  -Jason
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
Comment: See https://private.idealab.com/public/jason/jason.gpg

iD8DBQFFGY6vswXMWWtptckRAu1QAKDg1M3AFoDyHX7Zh3pfMz5RO3zyrQCfcQor
z78KtLyYIOKzeaAzq5xYLPY=
=Xe8O
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060926132742.Q2780>