Date: Wed, 11 Oct 2006 11:34:10 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-hackers@FreeBSD.ORG Subject: Re: "tar -c|gzip" faster than "tar -cz"?!? Message-ID: <200610110934.k9B9YASW081294@lurza.secnetix.de> In-Reply-To: <17707.64434.913943.549852@bhuda.mired.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Meyer wrote: > Not necessarily a known problem, but not a surprise. I'm not sure > about the size issue - it's not clear what compression level it's > running at. The real time difference is expected. tar uses libarchive, > which does the compression in the process. So while piping tar's > output to gzip will let gzip compress data while tar is waiting on > disk I/O, having tar compress things for you means that doesn't > happen. There was no disk I/O involved in my tests. All data was cached in RAM. You can also see from the my numbers that the "user time" was almost the same as the "real time". > Since they use different code - with different licenses - some > difference is expected. Different code? tar/libarchive uses libz, and I thought that gzip also uses libz, but I could be wrong. If gzip uses its own code instead of libz, that would explain the results of my test, of course. So it seems that gzip is 30% faster than libz ... quite significant, I think. It seems I won't use tar's z option anymore. :-) 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. "To this day, many C programmers believe that 'strong typing' just means pounding extra hard on the keyboard." -- Peter van der Linden
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610110934.k9B9YASW081294>