Re: Switching default dpkg-deb compressor to xz
On Wed, May 08, 2013 at 11:13:59PM +0200, Adam Borowski wrote:
> On Wed, May 08, 2013 at 06:14:36PM +0200, Bastian Blank wrote:
> > On Tue, May 07, 2013 at 09:49:03PM +0200, Guillem Jover wrote:
> > > As mentioned some months ago , I'm planning to switch dpkg-deb default
> > > compressor from gzip to xz, as there seemed to be consensus that was
> > > the way to go, and given the amount of already manually switched
> > > packages, or packaging helpers. :/
> > What about the compression level? xz -6 is pretty heavy and not needed
> > for 99% of the packages. -3 or even -2 or -1 are sufficient.
> As my and Hideki's repacks of the archive show, special-casing small
> packages is a waste of time: gains are hardly below linear for any
> packages big enough to take longer than fork()ing the compressor.
dpkg-deb does not fork the xz:
| $ objdump -x /usr/bin/dpkg-deb | grep liblzma
| NEEDED liblzma.so.5
> Quoting some data from 2011, all with xz -6:
> ] * A repack of the whole archive (amd64+all main, ~40GB) took close to three
> ] hours on a 6xPhenomII 2.8GHz box (ar p|gzip/bzip2 -d|xz).
This doesn't add up to the numbers I have from real life packages.
linux-image-*-amd64-dbg, compressed size 250MiB, takes 20-30 minutes to
compress on an 61xx Opteron.
> I'd thus suggest using the default, -6, everywhere other than perhaps
> openclipart (already compressed) and the likes. xz folks chose this value
> for a reason :)
What is the advantage of -6 over -1? How much better is it? How much
less time does it need? How much memory does it need?
I'm a soldier, not a diplomat. I can only tell the truth.
-- Kirk, "Errand of Mercy", stardate 3198.9