Ubuntu Rethinking Its Initramfs Compression Strategy

Written by Michael Larabel in Ubuntu on 8 December 2021 at 02:36 PM EST. 40 Comments
UBUNTU
While Ubuntu switched from LZ4 to Zstd for compressing its initramfs, they now are finding they were too aggressive in defaulting to Zstd with the highest compression level of 19. Due to speed and memory consumption concerns, they are looking at lowering their Zstd compression level.

Ubuntu had switched from LZ4 at its maximum compression level of 9 to going with Zstd, which is wonderful, and has a maximum level of 19. But with that highest compression level they have found the initramfs decompression to be too slow and consumes too much memory. In particular, for low-end devices and embedded hardware like the Raspberry Pi Zero with just 512MB of RAM, it just crashes.

Ubuntu developers thus have been re-evaluating their Zstd compression level and looking at the time/compression/filesize impact with lowering the compression level.


Current thinking expressed by Canonical's Julian Andres Klode is to use the lowest level of one for hardware with 512MB or less, some compression level for other hardware, and Zstd 19 for image building. Finding the right mix in between for the proper memory / performance / time trade-off is still being determined but should be sorted out well in time for Ubuntu 22.04 LTS.

The current state of this initramfs compression evaluation was laid out on ubuntu-devel.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week