[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debian-installer: dropping library reduction pass?



Hi,

debian-installer uses a library reduction pass (mklibs) in order to
reduce initrd's size. This is needed to:
- fit the initrd on the boot media (originally 1.44MB floppy disk)
- reduce the memory consumption as the uncompressed initrd has to fit
  in memory during the installation process

This has some drawbacks:
- packages used in d-i have to ship a -pic package, in the best case
  adding some code to debian/rules, in the worst case needing to patch
  upstream code and/or do another build pass.
- a d-i image built with a version of the libc crashes if the udebs on
  the mirror have a newer version
- some additional code and workarounds in d-i

Computers have evolved since it was designed, they now accept bigger boot
media and have more memory. I think we reached a point were we can just
drop this pass. In any case if the size on the boot media is something
critical we should probably use another compression method like xz, which
is now supported by the kernel.

I have done some tests with the amd64 flavour, here are the results.
Note that the tests are a few months old (I didn't want to start such a
discussion in the middle of the freeze), so the various size might be
slightly different, but it should not change the conclusions.

flavour      |         mklibs                    |        mklibs-copy                |
             | initrd    | initrd.gz | initrd.xz | initrd    | initrd.gz | initrd.xz |
-------------+-----------+-----------+-----------+-----------+-----------+-----------+
netboot      | 45172     | 14720     | 10672     | 47660     | 15868     | 11264     |
netboot/gtk  | 94532     | 33536     | 23484     | 97072     | 34616     | 23940     |
hd-media     | 25548     | 8284      | 6128      | 27944     | 9392      | 6732      |
hd-media/gtk | 74656     | 27024     | 18924     | 77092     | 28052     | 19380     |
cdrom        | 18708     | 6212      | 4624      | 21104     | 7320      | 5228      |
cdrom/gtk    | 67676     | 24896     | 17380     | 70108     | 25924     | 17836     |

The maximum gain is for the cdrom flavour, with 11.4% on the memory
consumption and 15.1% on the initrd size. The minimum gain is for the
netboot/gtk flavour, with 2.6% on the memory consumption and 3.1% on
the initrd size.

If we really need to get the smallest possible initrd on some
architectures, I would suggest to switch it to xz compression, as the
gain is between 25 and 30% depending on the flavour.

Any comment or opinion?

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

Attachment: signature.asc
Description: Digital signature


Reply to: