Re: Easy trick to reduce kernel footprint

From: Willy Tarreau
Date: Sun Jun 05 2005 - 23:14:13 EST


On Sun, Jun 05, 2005 at 09:02:46PM -0400, Wakko Warner wrote:
> Willy Tarreau wrote:
> > Here's a simple trick for all those who try to squeeze their kernels to the
> > absolute smallest size.
> >
> > I recently discovered p7zip which comes with the LZMA compression algorithm,
> > which is somewhat better than gzip and bzip2 on most datasets, and I also
> > noticed that this tool provides support for gzip and bzip2 outputs. So I tried
> > to produce some of those standard outputs, and observed a slight gain compared
> > to the default tools. The reason is that we can change the number of passes and
> > the dictionnary size.
>
> Is it any smaller than a UPX'd kernel? (I think you need the beta version.
> I know the upx-ucl in debian won't compress but upx-ucl-beta will if you
> force). I got a significant reduction using it.

It's not better at all, but unfortunately, UPX cannot compress a kernel which
embeds a big initramfs. The problem is that the compressed initramfs is
embedded into vmlinux, which is then compressed into bzImage, and UPX only
replaces the bzImage compression.

May be it would work if we did not compress the initramfs before including
it into the vmlinux.

Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/