Bsdtar performance

Tim Kientzle kientzle at freebsd.org
Sun Mar 11 22:22:34 UTC 2007


Tim Kientzle wrote:
>> kientzle    2007-03-11 10:36:43 UTC
>>   FreeBSD src repository
>>   bsdtar 2.0.23:
>>      * read.c now relies on security checks in libarchive instead
>>        of trying to do its own...
> 
> Bsdtar should now be considerably faster than before.
> I put a lot of effort over the last few months into
> streamlining the code in libarchive to recreate objects
> on disk.

Here are some initial test results for bsdtar 2.0.22.
This test extracts an uncompressed ustar version of
"base.tgz" from a 5.3 distribution CD to a blank
300MB malloc-backed disk on a single-processor i386 system
with 1G physical RAM.

bsdtar -xPf:  1.53 seconds
gtar-1.13.25: 1.57 seconds
gtar-1.15.1:  1.58 seconds
bsdtar -xf:   1.59 seconds
gtar-1.16.1:  1.61 seconds
star:         1.82 seconds

I used /usr/bin/time <program> -xf ~/base.ustar and
ran each program at least 10 times, discarded the outliers
and averaged the rest.  (The user time varied quite
a bit, interestingly enough.)

Obviously, these results should vary dramatically
depending on the hardware ane the archive being tested
(mix of dirs, small files, large files, etc), so I'm
very eager to see results from other people (especially
any where bsdtar performs poorly).

Tim Kientzle

P.S. to create a ustar version of the 5.3 distribution,
use bsdtar as a format-conversion filter:
cat base.?? | bsdtar -cf ~/base.ustar --format=ustar @-


More information about the freebsd-current mailing list