Re: [PATCH v3 1/4] Add support for LZO-compressed kernels

Russell King
2009-11-13T15:46:39Z

On Wed, Nov 11, 2009 at 01:27:55PM +0100, Albin Tonnerre wrote:
> This is the first part of the lzo patch
> The lzo compressor is worse than gzip at compression, but faster at
> extraction. Here are some figures for an ARM board I'm working on:
>
> Uncompressed size: 3.24Mo
> gzip 1.61Mo 0.72s
> lzo 1.75Mo 0.48s

>From my testing on a Cortex A9 model:
- lzo decompressor is 65% of the time gzip takes to decompress a kernel
- lzo kernel is 9% larger than a gzip kernel

which I'm happy to say confirms your figures when comparing the two.

However, when comparing your new gzip code to the old gzip code:
- new is 99% of the size of the old code
- new takes 42% of the time to decompress than the old code

What this means is that for a proper comparison, the results get even better:
- lzo is 7.5% larger than the old gzip'd kernel image
- lzo takes 28% of the time that the old gzip code took

So the expense seems definitely worth the effort. The only reason I
can think of ever using gzip would be if you needed the additional
compression (eg, because you have limited flash to store the image.)

I would argue that the default for ARM should therefore be LZO.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/