From owner-freebsd-current@FreeBSD.ORG Fri Sep 30 21:21:44 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CC3B16A41F; Fri, 30 Sep 2005 21:21:44 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from blue.virtual-estates.net (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9412443D48; Fri, 30 Sep 2005 21:21:40 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by blue.virtual-estates.net (8.13.4/8.13.4) with ESMTP id j8ULLcU8011602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Sep 2005 17:21:39 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from mteterin.us.murex.com (195-11.customer.cloud9.net [168.100.195.11]) by corbulon.video-collage.com (8.13.4/8.13.1) with ESMTP id j8ULLX6g016024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 17:21:33 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from mteterin.us.murex.com (mteterin@localhost [127.0.0.1]) by mteterin.us.murex.com (8.13.3/8.13.3) with ESMTP id j8ULLRpW005782; Fri, 30 Sep 2005 17:21:27 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from localhost (localhost [[UNIX: localhost]]) by mteterin.us.murex.com (8.13.3/8.13.3/Submit) id j8ULLP54005781; Fri, 30 Sep 2005 17:21:25 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) X-Authentication-Warning: mteterin.us.murex.com: mteterin set sender to mi+mx@aldan.algebra.com using -f From: Mikhail Teterin Organization: Virtual Estates, Inc. To: "Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=" Date: Fri, 30 Sep 2005 17:21:24 -0400 User-Agent: KMail/1.8.2 References: <200509220446.j8M4kBPA019823@blue.virtual-estates.net> <200509221652.54123.mi+mx@aldan.algebra.com> <863bnppmhy.fsf@xps.des.no> In-Reply-To: <863bnppmhy.fsf@xps.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509301721.25026.mi+mx@aldan.algebra.com> X-Virus-Scanned: ClamAV devel-20050525/1106/Fri Sep 30 13:17:17 2005 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 X-Mailman-Approved-At: Sat, 01 Oct 2005 11:40:41 +0000 Cc: current@freebsd.org Subject: Re: using bzip2 to compress man-pages X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 21:21:44 -0000 > sectors are irrelevant. what you need to look at is the block size, > which is 16k by default. Ok, thanks. > % find /usr/share/man/ -name \*.gz -ls | sort -k 1 | awk '$1 == inode { > next } \ { inode=$1; total++; if ($7 % 16384 < $7*0.10) savings++ } \ > END {print savings " out of " total}' > 6 out of 2788 Using Charles' more precise mpsizer.py (with 16384 instead of 512), I get 7 out of 2708 -- and that is for the man* parts only (not cat), or 7*16kb=112Kb of savings. Not much by today's standards, but still a benefit, IMHO. Cat* stuff is only bigger, BTW. But this brings up another idea -- if the actual uncompressed man-page is less than the destination's FS block size, there is no point compressing it at all... Maybe, INSTALL_MAN should become more than an alias to install(1) and handle this sort of logic -- do not compress at all, gzip, or bzip2 -- depending on the file and FS at hand? (Yes, this assumes the blocksize of /usr/obj is the same as /usr, but the same ssumption is being made about /etc -- the destination of termcap.db). Whatever the case, the first step would be to smarten up man(1) anyway. Looks like David is on the case already. http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/79607 -mi