Meta Sees ~5% Performance Gains To Optimizing The Linux Kernel With BOLT

Written by Michael Larabel in Linux Kernel on 3 July 2024 at 01:08 PM EDT. 15 Comments
LINUX KERNEL
For years Meta/Facebook has been exploring using BOLT with the Linux kernel to optimize the layout of the Linux kernel binary. Since BOLT was upstreamed into LLVM, they've continued work around BOLT'ing the kernel. There is now a public guide for carrying out a BOLT-optimized Linux kernel build and roughly 5% better system performance to expect from such an optimized kernel.

Optimizing the Linux kernel with BOLT is currently yielding around 5% better performance than the default performance otherwise. The performance benefit to particular workloads ultimately depends upon how much time the application spends in kernel space, with the likes of database servers, other network intensive workloads, etc stand to benefit more than largely user-space bound tasks.

This past week Meta engineer Maksim Panchenko committed a Linux kernel optimization guide for those wanting to build a kernel image and see it optimized with BOLT. In that guide the particular performance advantage was explained as:
"By improving the code layout, BOLT can boost the kernel's performance by up to 5% by reducing instruction cache misses and branch mispredictions. When measuring total system performance, you should scale this number accordingly based on the time your application spends in the kernel (excluding I/O time)."

See the new guide for those wanting to optimize the Linux kernel with BOLT.
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