Canonical’s Ubuntu 19.10 “Eoan Ermine” will boot even faster than its predecessor, Ubuntu 19.04 “Disco Dingo” according to Ubuntu’s kernel team.
After extensive testing on a variety of compression options on the Ubuntu installation image, Canonical engineers determined that the LZ4 decompression method provided a most appreciable gain in speed.
The purpose of the kernel team’s testing was to find the most effective compromise between best compression (i.e., small file sizes) and decompression (i.e., speedy unpack times).
Ubuntu’s early boot requires loading and decompressing the kernel and initramfs from the boot storage device. A variety of factors determine this speed, including memory/cache speed for decompression and the compression type, the CPU, and speed of loading an image from the boot device.
The Canonical engineers conducted multiple experiments benchmarking several x86 configurations using the x86 TSC (Time Stamp Counter) to measure kernel load and decompression time. The team tested six different compression types: BZIP2, GZIP, LZ4, LZMA, LZMO, and XZ.
The Ubuntu kernel team concluded that LZ4 was the best way to go as it was much faster than the method they currently use in their kernels, GZIP.
However, the compressed LZ4 kernel was ~25% larger than was GZIP. This was of no considerable consequence since the longer LZ4 kernel load time was overcome by far faster decompression time. This was true even with a slow CPU and slow spinny media.
The faster the media became, the clear compression choice was LZ4 decompressing as the load time difference between GZIP LZ4 and LZO diminished.
Kernel compression shaves but fractions (~0.29 seconds on the slow x220 and ~0.05 seconds on faster servers) of a second in terms of total boot time.
Although not huge wins, the sin is but a simple config change. Canonical’s Colin King simplified the explanation on his blog:
Even with slow-spinning media and a slow CPU, the longer load time of the LZ4 kernel is overcome by faster decompression time.
According to the official release schedule on the Ubuntu wiki, Canonical’s Ubuntu 19.10 “Eoan Ermine” release schedule is:
- Beta Release: September 26, 2019
- Final Release: October 17, 2019