Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-evaluate initramfs compression? #114

Open
mika opened this issue Jul 4, 2022 · 1 comment
Open

Re-evaluate initramfs compression? #114

mika opened this issue Jul 4, 2022 · 1 comment

Comments

@mika
Copy link
Member

mika commented Jul 4, 2022

We use xz compression for initramfs since ages™, as it provides a small initramfs file:

# time update-initramfs -k all -u
[...]
real    0m30.415s
user    2m40.279s
sys     0m3.720s
# ls -lah /boot/initrd.img-*
-rw-r--r-- 1 root root 38M Jul  4 17:13 /boot/initrd.img-5.18.0-2-amd64
# file /boot/initrd.img-*
/boot/initrd.img-5.18.0-2-amd64: XZ compressed data, checksum CRC32

But initramfs-tools uses zstd as default compression for initramfs starting with v0.141 (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976054), and while disk usage increases, build time gets reduced quite significantly:

# time update-initramfs -k all -u
[...]
real    0m13.089s
user    0m14.102s
sys     0m3.094s
# ls -lah /boot/initrd.img-*
-rw-r--r-- 1 root root 47M Jul  4 17:12 /boot/initrd.img-5.18.0-2-amd64
# file /boot/initrd.img-*
/boot/initrd.img-5.18.0-2-amd64: Zstandard compressed data (v0.8+), Dictionary ID: None

We should figure out run-time issues (memory usage, time for uncompression), and if zstd performs better than xz, it might be worth switching to it as our new default?

@zeha
Copy link
Member

zeha commented Jul 28, 2022

https://salsa.debian.org/kernel-team/initramfs-tools/-/merge_requests/37#note_211939
the decompression time improvement sounds compelling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants