2002-10-21 14:06:04

by Amol Kumar Lad

[permalink] [raw]
Subject: gzip compression of vmlinux

Hi,
Currently we use gzip to compress vmlinux ( and finally form bzImage).
I am planning to replace it with bzip2 . Should I go ahead with it ?
Will it find its place in the latest kernel ?
We save some 35k of compressed bzImage using bzip2

Please cc me

Thanks
Amol





2002-10-21 14:35:48

by Richard B. Johnson

[permalink] [raw]
Subject: Re: gzip compression of vmlinux

On 21 Oct 2002, Amol Kumar Lad wrote:

> Hi,
> Currently we use gzip to compress vmlinux ( and finally form bzImage).
> I am planning to replace it with bzip2 . Should I go ahead with it ?
> Will it find its place in the latest kernel ?
> We save some 35k of compressed bzImage using bzip2
>
> Please cc me
>
> Thanks
> Amol

Is it allowed? I think Phil Katz had some claim to this since
he created the compression method by combining several published
algorithms. Don't hit me with fire, I was involved in the PK/ARC
Lawsuit. I am distinctly aware of his work.

The RedHat bzip2 Web Page seems to say that it's all "Free Software".
I suppose, upon the death of an author, everything's up for grabs.

At the very least, if you use this method, I suggest you name the
output file pkImage.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
The US military has given us many words, FUBAR, SNAFU, now ENRON.
Yes, top management were graduates of West Point and Annapolis.

2002-10-21 14:45:03

by Mark Robson

[permalink] [raw]
Subject: Re: gzip compression of vmlinux

On Tuesday 22 October 2002 12:41 am, Amol Kumar Lad wrote:
> Hi,
> Currently we use gzip to compress vmlinux ( and finally form bzImage).
> I am planning to replace it with bzip2 . Should I go ahead with it ?
> Will it find its place in the latest kernel ?
> We save some 35k of compressed bzImage using bzip2

If you replace the gzip kernel compression with bzip2, will it be easy to
also bzip2 initrd images?

If so, does the kernel then no longer need a gzip decompression routine? Does
the current implementation use the same gunzipper for the kernel and initrd
(possibly not? Is the kernel gunzipper real mode?)

If so then this is a good feature for some embedded systems which can trade a
few seconds of boot time for smaller images, particularly if it removes the
routine from the kernel.

How much slower is bunzip2?

On my system, bunzip2 decompresses a kernel image nearly 10x slower than gzip

[mark@athlon linux-2.4.19]$ time gunzip blah
0.08user 0.01system 0:00.09elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k

[mark@athlon linux-2.4.19]$ time bunzip2 blah.bz2
0.83user 0.04system 0:00.87elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k

and it only gets 6% smaller

but this is a highly unscientific test.

Mark

2002-10-21 15:04:15

by jbradford

[permalink] [raw]
Subject: Re: gzip compression of vmlinux

> Currently we use gzip to compress vmlinux ( and finally form bzImage).
> I am planning to replace it with bzip2 . Should I go ahead with it ?
> Will it find its place in the latest kernel ?
> We save some 35k of compressed bzImage using bzip2

There was a discussion about using bzip2 on this list a few months
ago:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0207.1/0467.html

John.

2002-10-24 07:54:31

by Eric W. Biederman

[permalink] [raw]
Subject: Re: gzip compression of vmlinux

Amol Kumar Lad <[email protected]> writes:

> Hi,
> Currently we use gzip to compress vmlinux ( and finally form bzImage).
> I am planning to replace it with bzip2 . Should I go ahead with it ?
> Will it find its place in the latest kernel ?
> We save some 35k of compressed bzImage using bzip2

You might also want to take a look at upx. It's compressor
is roughly of the same quality as gzip, but it's decompresser
is only a couple of hundred bytes. I don't know which will
buy you more in practice. I smaller decompresser, or a larger
decompresser with that compresses a little smaller. Or possibly
you just want to pass -9 to gzip?

Eric