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

Re: initrd sizes mushroomed several months ago



The Wanderer composed on 2022-11-13 06:54 (UTC-0500):

> On 2022-11-12 Felix Miata wrote:

>> # grep MODULES= /etc/initramfs-tools/initramfs.conf
>> MODULES=dep
>> # ls -Ggh /boot/initrd.img-[5,6]*
>> -rw-r--r-- 1 6.8M May  8  2022 /boot/initrd.img-5.17.0-1-686
>> -rw-r--r-- 1  31M Aug  2 03:06 /boot/initrd.img-5.18.0-3-686
>> -rw-r--r-- 1  31M Sep 30 15:43 /boot/initrd.img-5.19.0-2-686
>> -rw-r--r-- 1  36M Nov 12 01:36 /boot/initrd.img-6.0.0-3-686

>> Does anyone here have an explanation for the mega-change in size of initrds after
>> kernel 5.17? My initramfs.conf has had MODULES=dep since before testing/bullseye
>> became testing/bookworm.

> Just a stab in the dark, but:

> The changelog history for linux-image-5.18.0-4-amd64, on my system,
> gives the change from 5.17 to 5.18 as having happened in May of 2022.

> The changelog for initramfs-tools, on my system, shows exactly one
> version newer than May of 2022, released in July of 2022.

> The changelog for that version of initramfs-tools (0.142) includes the
> entry:

>   [ Dimitri John Ledkov ]
>   * [d8c5864] mkinitramfs: decompress compressed kernel modules

> with no reason or other information given. (There are a few other
> changes listed, which could also be relevant, but seem less obviously so
> from the brief descriptions - although it is of course hard to judge.)

> Just at first blush, it looks like something like that could produce an
> increase in size, potentially a notable one.

> (The previous version's changelog entry also switches compression to
> zstd, but that version came out in April, so it's unlikely to be the
> culprit.)

Size     Date         Version                   Host    LinesModsz Graphics/extras
# ls -Gg initrd*4	# gx78b PCIe aHD6450 0-nvme-ssd 1-ata-ssd
 7649297 May 15  2022 initrd.img-5.17.0-1-amd64 gx78b	 445 434M Gati
34289103 Jun 20  2022 initrd.img-5.18.0-1-amd64 gx78b	1132 459M Gati
34788924 Aug  6 22:15 initrd.img-5.18.0-3-amd64 gx78b	1135 470M Gati
23754843 Oct 21 03:16 initrd.img-5.19.0-2-amd64 gx78b	1133 474M Gati
26414992 Dec 24 02:14 initrd.img-6.0.0-6-amd64 gx78b	1196 457M Gati

Apt* history on this box only goes back to October. Oldest involving zstd is:
# zgrep zstd dpkg.log.2.gz
2022-10-21 01:40:37 install zstd:amd64 <none> 1.5.2+dfsg-1
2022-10-21 01:40:37 status half-installed zstd:amd64 1.5.2+dfsg-1
2022-10-21 01:40:37 status unpacked zstd:amd64 1.5.2+dfsg-1
2022-10-21 01:40:37 configure zstd:amd64 1.5.2+dfsg-1 <none>
2022-10-21 01:40:37 status unpacked zstd:amd64 1.5.2+dfsg-1
2022-10-21 01:40:37 status half-configured zstd:amd64 1.5.2+dfsg-1
2022-10-21 01:40:37 status installed zstd:amd64 1.5.2+dfsg-1

# ls -gG /etc/initramfs-tools/initramfs.conf
-rw-r--r-- 1 1582 Aug  6 22:15 /etc/initramfs-tools/initramfs.conf
# grep zstd /etc/initramfs-tools/initramfs.conf
# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ]
COMPRESS=zstd
# 0 - 19 for zstd

It's apparent in 5.19.0-2 that it was the first to have utilized zstd
in its creation.

I don't see any indication that module compression is directly involved in the
massive initrd size increase last June. In the response to David I haven't
finished is the bottom line that the egregious increase is inexplicable inclusion
of firmware for AMD/ATI GPUs.
-- 
Evolution as taught in public schools is, like religion,
	based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata


Reply to: