Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2006 18:23:41 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Tim Kientzle <tim@kientzle.com>
Cc:        src-committers@FreeBSD.org, Andre Oppermann <andre@FreeBSD.org>, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, Tim Kientzle <kientzle@FreeBSD.org>, Ruslan Ermilov <ru@FreeBSD.org>, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: bsdtar vs gtar performance
Message-ID:  <20060924165852.O74016@delplex.bde.org>
In-Reply-To: <45156E4E.6040806@kientzle.com>
References:  <200609150804.k8F84O1H056038@repoman.freebsd.org> <20060915155912.GA71796@xor.obsecurity.org> <450AD508.10608@freebsd.org> <20060915180315.GB74735@xor.obsecurity.org> <450C30ED.7090901@freebsd.org> <20060916192437.GA15425@xor.obsecurity.org> <45156E4E.6040806@kientzle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 23 Sep 2006, Tim Kientzle wrote:

> Kris and Ruslan were recently discussing the performance of bsdtar
> relative to gtar, which prompted me to do some measurements
> of my own.   I used /usr/ports as my test, because it stresses
> file and directory creation over extracting large files.
>
> Here are some initial results, based on ten runs of each test on a
> quiescent system, comparing results with PHK's "ministat":
>
> [... ones with no difference]
>
> * Extracting uncompressed archives:  gtar is about 13% faster
>   than bsdtar in my test.  Interestingly (to me), this was the same
>   with or without -m.  (I've long suspected dir timestamp restores
>   as a contributor; this shows otherwise.)

Changes to attributes by syscalls (utimes(), chown()... are always
written asynchronously, so -m should always have little effect.

A quick test showed that the main difference for extraction is that
bsdtar does an lchmod() for every file extracted.  gtar apparently
optimizes away null chmod()'s.  I would expect -m to make little
difference for bsdtar since the writes for the changes to the
attributes from utimes() + lchmod() are coalesced, but for gtar
-m would be noticeable faster since it usually eliminates these
writes.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060924165852.O74016>