Zstd-Compressing The Linux Kernel Has Been Brought Up Again

Written by Michael Larabel in Linux Kernel on 10 June 2019 at 04:31 AM EDT. 37 Comments
Using the Zstd compression algorithm to compress the Linux kernel image has been brought up again with new patches expected in the coming weeks.

It's been brought up multiple times before to allow Zstd compression for the Linux kernel image. But to date the patches have been rejected from mainline on the basis of almost yearly there being some hot new trend in compression algorithms and the desire to add them immediately to the mainline kernel. It's been brought up that if Zstd were to be added or some other compression algorithm, an existing alternative should at least be deprecated or removed.

Nick Terrell of Facebook restarted the discussion on Friday after being involved with the talks last year. He was also involved with the Btrfs Zstd compression work among others with Zstandard being a Facebook creation.

He noted in the restarted thread, "We're using these patches internally as well. We're seeing an improvement on an Intel Atom N3710, where boot time is reduced by one second over using an xz compressed kernel. It looks like Ubuntu just switched to a lz4 compressed kernel, but zstd is likely a better trade off, because it compresses much better and still has excellent decompression speed. Since its been nearly a year since I sent these out, I will take some time to rebase and retest the patches in case anything changed, and then then resend the patches in the next weeks."

We'll see where this next round leads... But, yes, at least for now Ubuntu is moving ahead with LZ4 initramfs plans with Zstd not being mainlined. If all were to magically go super smooth this time, we could potentially see the Zstd compression support merged for Linux 5.3 but that would allow minimal time for testing (sans Ubuntu carrying the patches early to their current kernel) ahead of the Ubuntu 19.10 release. Besides Ubuntu though, surely others would be interested in a Zstd-compressed kernel image as well.
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