[Top][All Lists]

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

[Bug-tar] GNU TAR or STAR -- speed comparision

From: Jan Psota
Subject: [Bug-tar] GNU TAR or STAR -- speed comparision
Date: Thu, 18 Oct 2007 03:49:25 +0200

> star is definitely much faster than GNU tar ,-)
> If you know a fater tar implementation than star, send the name,
> a test and a bug report!
Here You are:

I made some tests to find out, which tar implementation is faster:

Both programs were compiled with gcc-4.2.2 on Gentoo and with CFLAGS set to
"-O2 -march=athlon-xp -mfpmath=sse -frename-registers -pipe"

All tests were executed on 1500MHz Athlon-XP, 512M SDRAM on KM133,
40G Maxtor (50MB/s).
        creating archives [about 72MB, 22000 files]
        for i in 1 2 ; do
                for c in tar star ; do
                        rm ~/t1.tar
                        time $c cf ~/t1.tar
tar     real    0m1.797s        user    0m0.168s        sys     0m1.280s
star    real    0m2.033s        user    0m0.144s        sys     0m1.692s
tar     real    0m1.925s        user    0m0.168s        sys     0m1.348s
star    real    0m2.048s        user    0m0.176s        sys     0m1.664s
tar     real    2m56.360s       user    0m0.460s        sys     0m27.634s
star    real    2m54.600s       user    0m0.272s        sys     0m41.227s
tar     real    2m52.244s       user    0m0.448s        sys     0m27.550s
star    real    2m48.909s       user    0m0.360s        sys     0m41.251s
tar     real    2m51.499s       user    0m0.488s        sys     0m27.690s
star    real    2m49.207s       user    0m0.288s        sys     0m40.651s

        creating archives to /dev/null
command:        like above, except:
        time $c c pkg/ | dd bs=1M > /dev/null
[dd wrote:]     [...] (72 MB), 1,18015 s, 60,7 MB/s / 48,1 MB/s
tar     real    0m1.199s        user    0m0.140s        sys     0m1.048s
star    real    0m1.480s        user    0m0.136s        sys     0m1.328s
tar     real    0m1.178s        user    0m0.132s        sys     0m1.036s
star    real    0m1.421s        user    0m0.128s        sys     0m1.284s
star    real    1m13.911s       user    0m0.300s        sys     0m33.674s

        listing archive contents
command:        like above, except:
        time $c tf t1.tar > /dev/null
tar     real    0m0.346s        user    0m0.172s        sys     0m0.172s
star    real    0m0.559s        user    0m0.108s        sys     0m0.448s
tar     real    0m0.346s        user    0m0.128s        sys     0m0.216s
star    real    0m0.554s        user    0m0.108s        sys     0m0.444s
        [300M archive]
star    real    0m2.467s        user    0m0.688s        sys     0m1.776s
tar     real    0m1.962s        user    0m1.084s        sys     0m0.876s

        scanning for differences
command:        instead of inner loop:
        time tar df ~/t1.tar ; time star f ~/t1.tar --diff diffopts=data
tar     real    0m1.097s        user    0m0.280s        sys     0m0.812s
star    real    0m1.613s        user    0m0.360s        sys     0m1.224s
tar     real    0m1.071s        user    0m0.288s        sys     0m0.784s
star    real    0m1.639s        user    0m0.400s        sys     0m1.232s

1. On big archives star is from 2% to 5% faster.
2. When operating on files cached in memory, GNU tar is about half time faster.
3. Using STAR or GNU TAR is a question of habit, because both are comparable.

Jan Psota

reply via email to

[Prev in Thread] Current Thread [Next in Thread]