Ubuntu 19.10 to use LZ4 compression to boot even faster

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. Read on for details.

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.

Ubuntu 19.10
Ubuntu 19.10

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.

Ubuntu 19.10 Developmental Build
Ubuntu 19.10 Developmental Build

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
Travis Rose
Hi, I'm M Travis Rose, a contributor to FOSS Linux. I have over thirty years of experience in the IT arena, at least fifteen of which has been working with Linux. I enjoy converting existing Windows users to the wonderful world of Linux. I guess you could call me a Linux-evangelist. Long live Linux!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

24,110FansLike
213FollowersFollow
7SubscribersSubscribe

LATEST ARTICLES

screen capture apps linux
Do you want to make a video tutorial for YouTube or show-off your epic victory royale to your friends? Look no further — as we have compiled the 10 Best Screen Capturing Software for Linux. Whether you need to record your desktop screen or take a simple screenshot, FOSSLinux has got your back.
Test drive linux online
Enter DistroTest.net, a website that allows Linux users to test various distros online, without downloading the ISO or installing the distro. With DistroTest.net, you can check a distro with no muss, no fuss.
Best video editors for linux
This article is for all the Linux users out there who are looking for video editors to create their own professional videos, which can range from short documentaries to even movies.