Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72882 - [mkinitcpio] 31-1 does uncompress modules which wastes space and RAM

Attached to Project: Arch Linux
Opened by Tobias Powalowski (tpowa) - Tuesday, 30 November 2021, 09:13 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 30 November 2021, 09:38 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 3
Private No

Details

Hi,
https://github.com/archlinux/mkinitcpio/commit/6a55ffa3439e8c26181e03fca3f670208081ff4f#diff-ef7d009c7e812da10f8aa235954c0e128e820b20c053ea7e839a134022a91fdd

I really don't know why the decompression part was added at all, imho the module should stay at compression level as it was intended by the kernel builder.

The decompression is horrible for archboot, it grows size extremly and so the RAM requirement to handle that too.

Measurement:
initcpio 30-2: 70MB all modules (cause it does not uncompress zstd modules)
initcpio 31-1: 252MB all modules (uncompressed all modules)

2 possible options to fix:
- leave kernel modules as the builder has chosen
- recompress modules with compression set in mkinitcpio.conf

This task depends upon

Comment by Tobias Powalowski (tpowa) - Tuesday, 30 November 2021, 09:35 GMT
Added patch which removes decompression.
Comment by Jonathon (jonathon) - Tuesday, 21 December 2021, 11:43 GMT
I tested this patch locally and it increased the size of my initramfs (both standard and fallback) compared to COMPRESSION="zstd" and COMPRESSION_OPTIONS=(-19). I suspect this means that the second fix option is already in operation? (looks like linux-lqx is already doing zstd module compression)

With patch:
-rw------- 1 root root 24042141 Dec 21 11:34 initramfs-linux-lqx-fallback.img
-rw------- 1 root root 7317177 Dec 21 11:34 initramfs-linux-lqx.img
-rw------- 1 root root 34834862 Dec 21 11:35 initramfs-linux-zen-fallback.img
-rw------- 1 root root 7831695 Dec 21 11:35 initramfs-linux-zen.img

Without patch:
-rw------- 1 root root 24042141 Dec 21 11:36 initramfs-linux-lqx-fallback.img
-rw------- 1 root root 7317177 Dec 21 11:35 initramfs-linux-lqx.img
-rw------- 1 root root 28242424 Dec 21 11:36 initramfs-linux-zen-fallback.img
-rw------- 1 root root 7540827 Dec 21 11:36 initramfs-linux-zen.img
Comment by Tobias Powalowski (tpowa) - Tuesday, 21 December 2021, 11:58 GMT
It's not about file size, that will increase. It's about size during boot, there it is uncompressed and wastes space.
Comment by Jerry Xiao (JerryXiao) - Thursday, 30 December 2021, 14:27 GMT
Also, if decompression is really required, please redirect the zstd -d decompress output elsewhere since it is currently messing up the output of mkinitcpio.
Comment by Christian Hesse (eworm) - Thursday, 30 December 2021, 23:13 GMT
This is a bug in zstd 1.5.1...

See this for a workaround: https://github.com/archlinux/mkinitcpio/pull/85
Probably it will not be merged.

Loading...