[sclug] performance puzzle

Tom Dawes-Gamble tmdg at tmdg.co.uk
Wed Jan 19 22:57:36 UTC 2005


Hi

Here is an interesting situation.

# time dd if=/mnt/tmp/foo of=/dev/null bs=1024 
1048577+0 records in
1048577+0 records out

real    0m8.793s
user    0m2.346s
sys     0m6.422s
# time dd if=/mnt/tmp/foo of=/mnt/tmp/bar bs=1024
1048577+0 records in
1048577+0 records out

real    0m27.614s
user    0m3.117s
sys     0m14.983s
# time dd if=/mnt/tmp/bar of=/mnt/tmp/baz bs=1024
1048577+0 records in
1048577+0 records out

real    0m54.358s
user    0m3.076s
sys     0m14.857s
# for i in /mnt/tmp/???
> do
> time md5sum $i
> done
4763dafae2d293e98b62979a00308158  /mnt/tmp/bar

real    0m21.199s
user    0m3.679s
sys     0m2.155s
4763dafae2d293e98b62979a00308158  /mnt/tmp/baz

real    0m21.194s
user    0m3.667s
sys     0m2.163s
4763dafae2d293e98b62979a00308158  /mnt/tmp/foo

real    0m5.770s
user    0m3.685s
sys     0m2.005s
# ll /mnt/tmp/???
-rw-r--r--  1 root root 1073742848 Jan 19 16:33 /mnt/tmp/bar
-rw-r--r--  1 root root 1073742848 Jan 19 16:34 /mnt/tmp/baz
-rw-r--r--  1 root root 1073742848 Jan 19 16:31 /mnt/tmp/foo


Why does foo perform so much better than bar or baz?

Please send the answer direct to me.  NOT the list. :-)

Regards.
Tom.



More information about the Sclug mailing list