Linux Patches Allow Changing Hibernation Compression Format For Better Performance

Written by Michael Larabel in Linux Kernel on 4 October 2023 at 06:34 AM EDT. 16 Comments
LINUX KERNEL
Currently when hibernating a Linux system LZO compression is used for preserving the memory contents while a new patch series posted today by Qualcomm allow for changing out the compression API used and makes LZ4 a new option during Linux hibernation.

LZO compression is currently used during the Linux hibernation process while the Qualcomm patches allow for targeting the Linux crypto (compression) API to support alternatives. In turn the patches go on to enable LZ4 compression as an alternative to LZO.

LZ4 hibernation results


When switching over to LZ4 compression, the decompression rate jumped from 335 MB/s to 501 MB/s and in turn shaved off around a half-second from the system restore time.

With the proposed patches LZO would remain the default compression mode for hibernation but the to-be-added CONFIG_HIBERNATION_DEF_COMP_LZ4 Kconfig option would allow changing the default or at run-time via a new hib_compression=lz4 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