[Bug 1944082] Re: initramfs-tools: zstd uses too much memory in mkinitramfs
Dimitri John Ledkov
1944082 at bugs.launchpad.net
Mon Oct 18 11:17:10 UTC 2021
In general we optimize for bootspeed, at the expense of generation time.
It is often the case that we can complete the boot on systems smaller
than required to recreate files for such boot. I.e. impossible to
install/upgrade packages.
Are you experiencing failure to create initrd, where previously you
could? a 512MB instance should still be able to create zstd compressed
initrd and boot.
** Changed in: initramfs-tools (Ubuntu)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1944082
Title:
initramfs-tools: zstd uses too much memory in mkinitramfs
Status in initramfs-tools package in Ubuntu:
Incomplete
Bug description:
Changing the default compression method of initramfs to zstd using
hardcoded compression flag "-19 -T0" takes 200MB memory in return for
40MB reduction of disk IO. I think it is too much memory usage for
some fraction of seconds while booting.
The default compression method of initramfs was changed in Bug #1931725 for impish but the runtime memory usage was not discussed well.
the test results by modifying compression command in /usr/sbin/mkinitramfs on a small VM (amd64, 512MB RAM, 1vCPU, with 5.13.0-16-generic image)
| RSSmax | initrd size
zstd -q -19 -T0 | 214MB | 64MB (+-0MB)
zstd -q -3 -T1 | 44MB | 84MB (+20MB)
lz4 -9 -l | 15MB | 107MB (+43MB)
Since the hardcoded flag uses "-T0", more memory will be used if more CPU threads are available.
Please reconsider the default compression method or patch the hardcoded flag to "-3 -T1" (=zstd default).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1944082/+subscriptions
More information about the foundations-bugs
mailing list