[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: confused about performance



Leopold Palomo-Avellaneda wrote:
A Dijous 14 Juny 2007 16:32, Lennart Sorensen va escriure:

Now I just tried a small stupid test here:

I have a zip file that is 61592222 bytes.  I tried running
'time tar cvzf test.tgz my.zip' on both 32 and 64 bit on an Athlon 64 3500+
running a 64bit kernel with 1GB ram.

According to time, it takes 0m3.776s of user time (so not counting
system calls) on 64bit, and 0m4.556s on 32bit.  That indicates tar/gzip
runs 20% faster on 64bit than 32bit at least when the kernel is 64bit
and run on the same machine.  I ran them a few times each to make sure
caching and such didn't affect them.  Maybe your test method wasn't
correct or the two systems aren't as identical as you think.


FWIW, I also observe that 64 bits application (Debian/Etch) are running faster than 32 bits application on the same hardware (actually I am testing on a DualCore2 (Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz, 4096 KB) with AMD64 kernel 2Gb RAM (enough to keep a 300Mb file in cache) and a chrooted 32 bits subsystem

For a 300Mb file (gotten from /dev/urandom with dd):

in 64 bits the best time (of 5 runs) for wc is
  1228486   6931475 314572800 /tmp/bigfile2
wc /tmp/bigfile2  3.36s user 0.14s system 99% cpu 3.500 total

The best time in 32 bits mode is (chrooted on same hardware)
  1228486   6931475 314572800 /tmp/bigfile2
wc /tmp/bigfile2  4.14s user 0.10s system 99% cpu 4.251 total

For compression with bzip2 the best time in 64 bits is
bzip2 -c /tmp/bigfile2 > /dev/null  74.43s user 0.13s system 99% cpu 1:14.58 total
and in 32 bits
bzip2 -c /tmp/bigfile2 > /dev/null  81.68s user 0.15s system 99% cpu 1:21.86 total

For the md5 checksum, best time in 64 bits is
2c461881e5d354dc8f304173fb915ad7  /tmp/bigfile2
md5sum /tmp/bigfile2  0.73s user 0.10s system 100% cpu 0.829 total
and in 32 bits
2c461881e5d354dc8f304173fb915ad7  /tmp/bigfile2
md5sum /tmp/bigfile2  0.90s user 0.12s system 99% cpu 1.029 total

As you can see, running in 64 bits is always a win.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faïencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***



Reply to: