Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2000 10:19:02 +0100
From:      Roger Hardiman <roger@cs.strath.ac.uk>
To:        small@freebsd.org
Subject:   bzip2 vrs gzip saves me 28k on my kernel size
Message-ID:  <395C6606.30675C5C@cs.strath.ac.uk>

next in thread | raw e-mail | index | archive | help
Hi,
Following on from my kernel size tests, I
compressed the kernel image with bzip2 instead of gzip.

Ok, bzip2 is not in the loader, but it made me think more
about the compression we use.


1) The original kernels
default optimise: gcc -O  kernel is 1212593 bytes.
   size optimise: gcc -Os kernel is 1203761 bytes

2) The kernels compressed with gzip
default optimise: kernel.gz is  551628 bytes
  size optimise:  kernel.gz is  554033 bytes.

3) The kernels compressed with bzip2, from the Ports Tree
default optimise: kernel.gz is  523435 bytes
  size optimise:  kernel.gz is  522065 bytes


SUCCESS
We have 2 good results here.
bzip2 gets the default kernel 27.5K SMALLER!
( 28193 bytes smaller )

And if we use the kernel optimised for size, we
actually save another 1.3K (1370 bytes)
BZIP2ed kernel


So, we can save 28.8K here.

Of course, I have not forgotten the space need for bzip2's
decompressor.

I'd hope we can put a bzip2's decompressor into the boot loader
and take out the gunzip code at the same time, making a nice
space saving.
bzip2 has a BSD licence too, so we have no problems integrating
it into PicoBSD.


Any comments on this?


Roger
--
Roger Hardiman
Strathclyde Uni Telepresence Research Group, Glasgow, Scotland.
http://www.telepresence.strath.ac.uk      0141 548 2897
roger@cs.strath.ac.uk


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-small" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?395C6606.30675C5C>