[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] GNU tar, star and BSD tar speed comparision +script
From: |
Jan Psota |
Subject: |
[Bug-tar] GNU tar, star and BSD tar speed comparision +script |
Date: |
Mon, 22 Oct 2007 22:34:32 +0200 |
Concatenated output of tcp script (below).
I replaced 'tar' with 'star' by hand. Have fun :-).
1. Tested on Athlon 1500MHz, RAM 512MB, disk speed 50MB/s, reiserfs
best time of 3 repetitions, /tmp/drv, 82M, 4105 files
program operation real user system speed
bsdtar create 0.71 0.10 0.60 102253 KB/s
star create 1.18 0.02 1.05 61532 KB/s
gnutar create 0.67 0.01 0.65 108370 KB/s
bsdtar list 0.05 0.02 0.02 1452160 KB/s
star list 0.59 0.02 0.46 123064 KB/s
gnutar list 0.22 0.02 0.19 330036 KB/s
bsdtar extract 0.74 0.08 0.65 98118 KB/s
star extract 1.29 0.03 1.16 56285 KB/s
gnutar extract 0.68 0.04 0.64 106776 KB/s
bsdtar compare unsupported
star compare 1.04 0.22 0.71 69815 KB/s
gnutar compare 0.59 0.16 0.43 123064 KB/s
best time of 3 repetitions, /home/jasiu, 2,1G, 8377 files
program operation real user system speed
bsdtar create 119.78 1.55 28.81 17461 KB/s
star create 120.44 0.26 40.49 17365 KB/s
gnutar create 118.34 0.49 28.43 17674 KB/s
bsdtar list 0.21 0.06 0.14 9960157 KB/s
star list 37.46 0.18 17.96 55836 KB/s
gnutar list 36.02 0.29 8.17 58068 KB/s
bsdtar extract 148.44 3.54 28.94 14090 KB/s
star extract 149.99 0.40 38.77 13945 KB/s
gnutar extract 147.57 0.34 27.94 14173 KB/s
bsdtar compare unsupported
star compare 119.52 6.01 26.80 17500 KB/s
gnutar compare 615.32 3.84 16.94 3399 KB/s
2. Tested on Athlon 64 2x2.2GHz, RAM 2GB, disk 60MB/s, reiserfs
best time of 3 repetitions, src="" 202M, 1890 files
program operation real user system speed
bsdtar create 0.34 0.03 0.30 596447 KB/s
star create 0.43 0.00 0.58 471609 KB/s
gnutar create 0.32 0.00 0.31 633812 KB/s
bsdtar list 0.01 0.00 0.01 20282000 KB/s
star list 0.31 0.00 0.20 654258 KB/s
gnutar list 0.11 0.01 0.10 1843818 KB/s
bsdtar extract 0.36 0.02 0.33 563388 KB/s
star extract 0.44 0.03 0.56 460954 KB/s
gnutar extract 0.32 0.01 0.30 633812 KB/s
bsdtar compare -
star compare 0.37 0.13 0.36 548162 KB/s
gnutar compare 0.45 0.20 0.24 450711 KB/s
best time of 3 repetitions, /home, 3,0G, 7443 files
program operation real user system speed
bsdtar create 77.98 0.56 11.60 39130 KB/s
star create 72.78 0.13 13.40 41923 KB/s
gnutar create 79.02 0.20 11.87 38613 KB/s
bsdtar list 0.05 0.02 0.02 61025140 KB/s
star list 48.02 0.06 4.45 63541 KB/s
gnutar list 47.82 0.12 3.00 63807 KB/s
bsdtar extract 127.53 0.65 13.15 23925 KB/s
star extract 132.70 0.11 10.82 22993 KB/s
gnutar extract 132.04 0.13 12.62 23108 KB/s
bsdtar compare -
star compare 108.33 1.17 7.90 28166 KB/s
gnutar compare 240.63 3.27 7.06 12680 KB/s
--
Jan Psota
-------------------------------------tcp-------------------------------------
#!/bin/sh
# tar comparision program
# 2007-10-23 Jan Psota
n=3 # number of repetitions
TAR=(bsdtar tar gnutar) # TApeArchivers to compare
OPN=(create list extract compare) # operations
test $# -ge 2 || {
echo -e "usage:\t$0 tmp_dir src_dir...
TCP stands for Tar Comparision Program here.
It currently compares: BSD tar, star, and GNU tar in archive creation,
listing, extraction and archive-to-extracted comparision.
Tcp prints best time of n=$n repetitions.
Tcp will create temporary archive named tmp_dir/tcp.tar and tmp_dir/tmp
to store extracted files (after normal exit they will be removed).
Tcp does not check filesystem tmp_dir is on for free space, so make sure
there is two times more space in tmp_dir than biggest of src_dirs uses.
Tcp expects 'tar' linked to 'star' because of star's programmer's wish ;-)
[-no-fsync and other...], so original GNU tar should be renamed to 'gnutar'
for tests.
Do not use white space in arguments."
exit 0
}
tmp=$1; shift
SRC="">
dst=$tmp/tcp.tar
dst_path=$tmp/tmp
test -e $dst -o -e /tmp/tcp \
&& { echo "$dst or /tmp/tcp exists, exiting"; exit 1; }
mkdir $dst_path || exit 2
use_times ()
{
LC_ALL=C awk -vN=$n -vL="`du -k $dst`" -vOFS="\t" -vORS="" '
/real|user|sys/ { T[$1] = $2 }
/sys/ { S=(T["real"]>0) ? S=(L+0)/T["real"] : 0
print "",T["real"], T["user"], T["sys"]
printf "%10.1d KB/s\n", S }' \
/tmp/tcp | sort | head -1
}
for src in address@hidden; do
test -d $src || { echo "'$src' is not a directory"; continue; }
echo -e "best time of $n repetitions, src="" archive=$dst,\n"\
"\textract to $dst_path, "`du -sh $src | awk '{print $1}'`",\
" `find $src | wc -l`" files"
echo -e "program\toperation\treal\tuser\tsystem\tspeed"
let op_num=0
for op in "cf $dst -C $src ." "tf $dst" "xf $dst -C $dst_path" \
"f $dst -C $dst_path --diff"; do
let tar_num=0
for tar in address@hidden; do
cat /dev/null > /tmp/tcp
echo -en "$tar\t${OPN[op_num]}\t"
for ((i=1; i<=$n; i++)); do
echo $op | grep -q ^cf && rm -f $dst
echo $op | grep -q ^xf &&
{ chmod -R u+w $dst_path
rm -rf $dst_path; mkdir $dst_path; }
sync
if echo $op | grep -q ^f; then # op == compare
time -p $tar $op > /dev/null
else # op in (create | list | extract)
time -p $tar $op > /dev/null || exit 3
fi 2>> /tmp/tcp
done
use_times
let tar_num++
done
let op_num++
echo
done
done
rm -rf $dst_path $dst /tmp/tcp
- [Bug-tar] GNU tar, star and BSD tar speed comparision +script,
Jan Psota <=
- Re: [Bug-tar] GNU tar, star and BSD tar speed comparision +script, Jan-Benedict Glaw, 2007/10/22
- [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD tar speed comparision +script), Jan-Benedict Glaw, 2007/10/22
- Re: [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD tar speed comparision +script), Jan-Benedict Glaw, 2007/10/22
- ODP: [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD tar speed comparision +script), Jan Psota, 2007/10/22
- Re: ODP: [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD tar speed comparision +script), Joerg Schilling, 2007/10/22
- Re: ODP: [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD tar speed comparision +script), Chuck Swiger, 2007/10/22
Re: [Bug-tar] GNU tar, star and BSD tar speed comparision +script, Tim Kientzle, 2007/10/23