LZ4 Support Revised For Faster Restore From Linux Hibernation

Written by Michael Larabel in Linux Kernel on 5 December 2023 at 06:24 AM EST. 26 Comments
LINUX KERNEL
Published originally back in October were a set of patches for allowing different compression algorithms for the Linux hibernation image to yield faster restore times. That work -- focused on LZ4 compression support -- has been revised as it works toward the mainline kernel.

This work out of Qualcomm is about replacing the Linux hibernation's code of explicit LZO API use with the generic crypto APIs and in turn allowing LZ4 to be optionally used for compressing the hibernation image.

By default LZO would be the preferred compression algorithm but via a "hib_compression=lz4" boot option would allow using LZ4 compression. The engineers found that the restore time with LZO was around 4.4 seconds but dropped to around 3.8 seconds when using LZ4, with the decompression rate jumping from 335 MB/s to 501 MB/s. The downside though is the LZ4 compressed image is slightly larger than LZO.

LZ4 hibernation performance


Those interested in this effort for faster hibernation restore performance on Linux systems can find the v2 patches via the kernel mailing list.
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