Thanks Oracle! New Patches Pending Can Reduce Linux Boot Times Up To ~49%
Written by Michael Larabel in Linux Kernel on 1 May 2020 at 10:46 AM EDT. 114 Comments
LINUX KERNEL --
While many don't look upon Oracle's open-source software contributions too eagerly, some new patches out by their team can dramatically benefit Linux kernel boot times and they are working on getting it upstream. The numbers are already very promising and further work is also underway to make the improvement even more tantalizing.

Back in 2017 the Oracle Linux Kernel Team announced KTask for in-kernel multi-threading for CPU intensive tasks. The KTask framework never made it into the mainline Linux kernel but has been in use with Oracle Linux's Unbreakable Enterprise Kernel. But now a newer iteration of the patch series has been published that is focused just on being able to handle multi-threaded jobs with PADATA.

Linux's PADATA is a parallel execution mechanism for running jobs on multiple CPUs while retaining task ordering. PADATA in its present form runs in parallel may single-threaded jobs but with the work out of Oracle it can handle multi-threaded jobs by splitting up the work evenly across CPU cores. This patch series gets PADATA ready for multi-threading with the initial user being deferred struct page init, as a major bottleneck in the Linux boot process.

Oracle's Daniel Jordan noted, "This has been tested on a variety of x86 systems and speeds up kernel boot by 6% to 49% by making deferred init 63% to 91% faster." Oracle is seeing great performance out of this parallelization work at boot time especially on multi-node setups with large quantities of RAM. This work not only benefits bare metal systems but also the time for firing up VMs, which is important for cloud use-cases especially if needing to respond to changing capacity/demand.


An Intel kernel developer also commented that on a test system he found the time it took to hit /sbin/init was nearly halved and "That makes a huge difference; memory initialization is the largest remaining component of boot time."

These patches in their current form are exciting, but this is just the start. Separate from this initial PADATA multi-threaded jobs support and initial user, there are more patches in the works for being able to parallelize more kernel tasks.

Let's hope the code review goes well and this work can find its way soon into the mainline kernel (Linux 5.8 perhaps if going fast enough). For now the work can be found on the kernel mailing list.
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week