Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2005 16:52:53 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        Charles Swiger <cswiger@mac.com>, Ulrich Spoerlein <q@galgenberg.net>
Cc:        current@freebsd.org
Subject:   Re: using bzip2 to compress man-pages
Message-ID:  <200509221652.54123.mi%2Bmx@aldan.algebra.com>
In-Reply-To: <CF4FBAB7-791D-41E0-B59B-9D78C6E4381F@mac.com>
References:  <200509220446.j8M4kBPA019823@blue.virtual-estates.net> <20050922182104.GC990@galgenberg.net> <CF4FBAB7-791D-41E0-B59B-9D78C6E4381F@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ulrich Spoerlein wrote:
> 1. I dont want to wait for my manpages to display, they have to be on
> screen instantanously.

A human being can not distinguish between a millisecond and a microsecond. The 
difference between gzcat and bzcat is far less dramatic.

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.

It just makes sense -- and the CPUs are advancing faster than storage devices.

Charles Swiger wrote:
> My guess is that roughly 95% of the manpages aren't going to save a š
> disk sector by switching.

One does not need to save the entire sector-size. Only the (size % 
sector_size), which currently pushes the file into an additional sector.

The following command line assumes, the sector size of 512 bytes and the bzip2 
vs. gzip saving of only 10%. Notice, it takes care to look once at every 
manual page even if it is has more than one alias (eliminating pages with the 
same inode). Try this on your system:

% find /usr/share/man/ -name \*.gz -ls | sort -k 1 | awk '$1 == inode { next } 
{ inode=$1; total++; if ($7 % 512 < $7*0.10) savings++ } END {print savings " 
out of " total}'
1200 out of 2694

1200 files out 2694... That's a little more than 5%...

The other advantage is the stride towards freer-licensed software.

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509221652.54123.mi%2Bmx>