From owner-freebsd-current@FreeBSD.ORG Fri Sep 23 13:59:20 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 E65B316A420 for ; Fri, 23 Sep 2005 13:59:20 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from leto.uk.clara.net (leto.uk.clara.net [80.168.69.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FEB243D46 for ; Fri, 23 Sep 2005 13:59:16 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from bloodhound.noc.clara.net ([195.8.70.207]) by leto.uk.clara.net with esmtp (Exim 4.43) id 1EIo53-0009YX-ME; Fri, 23 Sep 2005 14:59:13 +0100 Received: from personal by bloodhound.noc.clara.net with local (Exim 4.52 (FreeBSD)) id 1EIo57-000PS9-V5; Fri, 23 Sep 2005 14:59:17 +0100 Date: Fri, 23 Sep 2005 14:59:17 +0100 From: Brian Candler To: Mikhail Teterin Message-ID: <20050923135917.GA97140@uk.tiscali.com> References: <200509220446.j8M4kBPA019823@blue.virtual-estates.net> <20050922182104.GC990@galgenberg.net> <200509221652.54123.mi+mx@aldan.algebra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200509221652.54123.mi+mx@aldan.algebra.com> User-Agent: Mutt/1.4.2.1i 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, 23 Sep 2005 13:59:21 -0000 On Thu, Sep 22, 2005 at 04:52:53PM -0400, Mikhail Teterin wrote: > The space-saving potential can substantial, however -- see below. Being able > to stick us useful root filesystem (with /usr) onto a USB key can be useful > for some applications. Of course, if space is that critical you don't need to install the 'manpages' distribution set in the first place. However I have another suggestion. For USB pen drives, if you don't mind your /usr filesystem being read-only then you can get a big benefit from using geom_uzip. I've just tried it on the manpages: # du -sk /usr/share/man 17978 /usr/share/man # dd if=/dev/zero of=test.ufs bs=1k count=50k # mdconfig -a -t vnode -f test.ufs -u 0 # bsdlabel -w md0 auto # newfs -m 0 -i 1024 md0c # mount /dev/md0c /mnt # tar -C /usr/share/man -cf - . | tar -C /mnt -xf - # note, lots of hard links # df -k Filesystem 1K-blocks Used Avail Capacity Mounted on ... /dev/md0c 44526 17980 26546 40% /mnt # umount /mnt # mdconfig -d -u 0 # mkuzip test.ufs # ls -l test.ufs.uzip -rw-r--r-- 1 root brian 12966912 Sep 23 14:42 test.ufs.uzip # mdconfig -a -t vnode -f test.ufs.uzip -u 0 # mount -r /dev/md0.uzip /mnt # df -k ... /dev/md0.uzip 44526 17980 26546 40% /mnt That's a reduction from 17978K to 12663K, or 30%, even though all these files are already compressed (apart from /usr/share/man/whatis, which is only 210K). I expect that's due to the partial sectors at the end of all these small files. I've never tried booting from a geom_uzip filesystem, but I don't see why it shouldn't work :-) Regards, Brian.