Support For Compressing The Linux Kernel With LZ4

Written by Michael Larabel in Linux Kernel on 28 January 2013 at 06:45 PM EST. 15 Comments
LINUX KERNEL
A set of patches that allow the Linux kernel image to be compressed with the LZ4 lossless compression algorithm have been published. The size of LZ4-compressed Linux kernel images are larger than using LZO compression, but there's promise that the boot times could be better.

Kyungsik Lee posted the set of four patches that add in support for LZ4 compressed kernels and the initial RAMdisk on x86 and ARM architectures. LZ4 is a lossless compression algorithm known for its extremely fast decoder. The kernel decompression version is based upon the implementation by Yann Collet in the lz4 package.

In early testing from an ARMv7 system, the LZ4 compressed kernel image was 8% bigger than the LZO image, but the win comes in the form of faster decompression. A test Linux 3.4 kernel with LZO took 301ms to decompress while an LZ4 image took 251ms. The LZ4 image was even faster if enabling unaligned memory access, where the time needed was only 167ms -- approaching the point of half the time that was needed for the LZO kernel.

These patches that add in the LZ4 decompressor module and other changes needed for supporting LZ4-compressed kernels on ARM and x86 architectures can be found on the Linux kernel mailing list. This would potentially be a feature for the Linux 3.9 kernel.
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