The Ubuntu Kernel team benchmark six compression methods for initramfs, including BZIP2,GZIP,LZ4,LZMA,LZMO and XZ, to measure the load time and decompression time of the Linux kernel. It mainly uses x86 TSC (Time Stamp Counter) to benchmark on x86 devices.
Based on the test results, the team found that LZ4 is the best compression / decompression method for Ubuntu 19.10 (Eoan Ermine) because BZIP2,LZMA and XZ decompress slowly, while LZ4 is 7 times faster than GZIP. LZO is about 1. 25 times faster than GZIP, but not fast enough.
"even on slow-running transport media and slow CPU, longer loading times for the LZ4 kernel lead to faster compression time," Colin Ian King said. However, with the increase of media transmission speed, the load time difference between GZIP,LZ4 and LZO decreases, and LZ4 is the biggest winner in terms of compression time. "
Since the release of Ubuntu 18.10 (Cosmic Cuttlefish), LZ4 has been used in Ubuntu by default, but it seems that Canonical will retain the default compression/decompression methods of the kernel and initramfs in the Ubuntu 19.10 (Eoan Ermine) operating system.
LZ4 is a lossless data compression algorithm, which can provide very fast compression and decompression speed. In Ubuntu 19.10 (Eoan Ermine), LZ4 will be used for x86 (64-bit), PPC64le (PowerPC 64-bit Little Endian) and s390 (IBM System z) kernels).Relevant:Analysis:https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3/kernel-compression-method.txt