From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 16 13:10:37 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 A95A516A403 for ; Mon, 16 Oct 2006 13:10:37 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0071D43D7B for ; Mon, 16 Oct 2006 13:10:36 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (qjylqn@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k9GDAU9Y007508; Mon, 16 Oct 2006 15:10:35 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k9GDAK40007507; Mon, 16 Oct 2006 15:10:20 +0200 (CEST) (envelope-from olli) Date: Mon, 16 Oct 2006 15:10:20 +0200 (CEST) Message-Id: <200610161310.k9GDAK40007507@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, babkin@users.sourceforge.net In-Reply-To: <392921.500871160788419415.JavaMail.root@vms062.mailsrvcs.net> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 16 Oct 2006 15:10:36 +0200 (CEST) X-Mailman-Approved-At: Mon, 16 Oct 2006 13:17:40 +0000 Cc: Subject: Re: "tar -c|gzip" faster than "tar -cz"?!? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, babkin@users.sourceforge.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2006 13:10:37 -0000 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