From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 10 20:53:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2396016A403 for ; Tue, 10 Oct 2006 20:53:38 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from antivirus.uni-rostock.de (mailrelay1.uni-rostock.de [139.30.8.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 469A443D49 for ; Tue, 10 Oct 2006 20:53:36 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Tue, 10 Oct 2006 22:53:35 +0200 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Content Technologies SMTPRS 4.3.20) with ESMTP id for ; Tue, 10 Oct 2006 22:53:35 +0200 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Tue, 10 Oct 2006 22:53:35 +0200 X-SCL: 1 47.51% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC (6.0.3790.1830); Tue, 10 Oct 2006 22:53:25 +0200 Received: from conversion-daemon.mail2.uni-rostock.de by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) id <0J6X00901TEOON@mail.uni-rostock.de> (original mail from joerg@britannica.bec.de) for freebsd-hackers@freebsd.org; Tue, 10 Oct 2006 22:53:24 +0200 (MEST) Received: from britannica.bec.de (storm.stura.uni-rostock.de [139.30.252.72]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) with ESMTP id <0J6X00DS5U0ODZ@mail.uni-rostock.de> for freebsd-hackers@freebsd.org; Tue, 10 Oct 2006 22:53:12 +0200 (MEST) Received: by britannica.bec.de (Postfix, from userid 1000) id 6730156F7; Tue, 10 Oct 2006 22:52:24 +0200 (CEST) Date: Tue, 10 Oct 2006 22:52:24 +0200 From: Joerg Sonnenberger In-reply-to: <200610101727.k9AHRrYo039774@lurza.secnetix.de> To: freebsd-hackers@freebsd.org Mail-followup-to: freebsd-hackers@freebsd.org Message-id: <20061010205224.GB19608@britannica.bec.de> MIME-version: 1.0 Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) References: <200610101727.k9AHRrYo039774@lurza.secnetix.de> X-OriginalArrivalTime: 10 Oct 2006 20:53:25.0097 (UTC) FILETIME=[2121DD90:01C6ECAE] Subject: Re: "tar -c|gzip" faster than "tar -cz"?!? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 20:53:38 -0000 On Tue, Oct 10, 2006 at 07:27:53PM +0200, Oliver Fromme wrote: > While doing some performance tuning of a backup script > I noticed that the -z option of our (bsd)tar behaves in > a very suboptimal way. It's not only a lot slower than > using gzip separately, it also compresses worse. [snip] I can't replicate this on DragonFly with our version of bsdtar and the gzip-on-top-libz. At least the later is measurable faster and gives better compression than GNU gzip. build# time bsdtar -czf test.tgz contrib/gcc-3.4 2.898u 0.067s 0:03.12 94.5% 204+92k 0+58io 0pf+0w build# time sh -c "bsdtar -cf - contrib/gcc-3.4 | gzip > test2.tgz" 2.928u 0.099s 0:03.57 84.3% 75+80k 0+58io 0pf+0w build# ls -l test*.tgz -rw-r--r-- 1 root wheel 7430189 Oct 10 22:48 test.tgz -rw-r--r-- 1 root wheel 7430189 Oct 10 22:48 test2.tgz Joerg