Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2006 15:10:20 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-hackers@FreeBSD.ORG, babkin@users.sourceforge.net
Subject:   Re: "tar -c|gzip" faster than "tar -cz"?!?
Message-ID:  <200610161310.k9GDAK40007507@lurza.secnetix.de>
In-Reply-To: <392921.500871160788419415.JavaMail.root@vms062.mailsrvcs.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Sergey Babkin wrote:
 > From: Oliver Fromme wrote:
 > > The difference in CPU time (and wall clock time) seems
 > > simply to be caused by different compression code.  gzip
 > > is noticeably more efficient than libz, at least on the
 > > OS/processor combination where I tested it (Athlon64 with
 > > FreeBSD/i386 6.2-PRERELEASE).
 > 
 > Any chance that gzip uses a different version of libz?

I've only had a quick look at the gzip code, but it doesn't
seem to use libz at all..

 > Or maybe the buffer size is different? Yet another
 > possibility could be if tar calls zlib with the SYNC
 > (or is that FLUSH? something like that) flag on each 
 > chunk, this would kill both the performance and the 
 > compression rate. Then again, the default compression
 > level may be different (but it should be making the
 > speed higher if the ratio falls lower).

The default compression level seems to be the same in
both cases (-6).  The sizes of the compressed archives
differ slightly, but when I change the compression level
with gzip manually (in either direction), then there's
a much larger difference.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"IRIX is about as stable as a one-legged drunk with hypothermia
in a four-hundred mile per hour wind, balancing on a banana
peel on a greased cookie sheet -- when someone throws him an
elephant with bad breath and a worse temper."
        -- Ralf Hildebrandt



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