LZ4 Compression For Hibernation Images Queued For Linux 6.9: Faster Restore Times

Written by Michael Larabel in Linux Kernel on 13 February 2024 at 08:24 PM EST. 21 Comments
In development the past several months has been patches to allow changing the compression algorithm used by the hibernation images of the Linux kernel while preserving the system memory contents. With using LZ4 yields faster system restore times from hibernation than the current de facto compression algorithm used of LZO. This work is now queued for introduction in Linux 6.9.

Qualcomm engineers pursued this work for not associating the system hibernation images to the LZO API but allowing use of the generic kernel crypto APIs so that LZ4 can be optionally used. The hibernation compression format can be changed at boot time such as with the "hib_compression=lz4" option. Engineers found using LZ4 could yield a restore time of about 3.8 seconds with LZ4 compared to about 4.4 seconds with LZ0.

LZ4 hibernation image benchmarks

When trying to be aggressive about power savings and making it more seamless to enable system hibernation support, these straight-forward patches make sense. The work was recently queued in the Linux power management subsystem's "linux-next" branch ahead of the Linux 6.9 merge window opening in March. LZO is set to remain the default compression algorithm unless overriding with the new CONFIG_HIBERNATION_COMP_LZ4 build time option.
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