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

Re: debian-installer: dropping library reduction pass?



Hi Aurélien,

and thanks for this state of the mklibs.

Aurelien Jarno <aurelien@aurel32.net> (2015-05-10):
> 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

I remember this one… It happens seldom enough that one might not know about
it until after having investigated some time in it and then after being told
it's a known bug. :)

> - 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.

(thanks)

> 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?

I'm pretty sure you know exotic archs better than I do, so if arm*, mips*
etc. are not going to take a direct hit with this change, and if mitigating
it through better compression is OK, let's implement your proposed changes.

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature


Reply to: