News: 0001475478

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

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

([Linux Kernel] 5 Hours Ago Linux Kernel + BOLT)


For years Meta/Facebook has been [1]exploring using BOLT with the Linux kernel to optimize the layout of the Linux kernel binary. Since [2]BOLT was upstreamed into LLVM , they've [3]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 [4]the new guide for those wanting to optimize the Linux kernel with BOLT.



[1] https://www.phoronix.com/news/Facebook-BOLTing-The-Kernel

[2] https://www.phoronix.com/news/LLVM-BOLT-Default-Test-Releases

[3] https://www.phoronix.com/news/LLVM-BOLT-Linux-Kernel-2024

[4] https://github.com/llvm/llvm-project/blob/main/bolt/docs/OptimizingLinux.md



Linuxhippy

muncrief

ptr1337

ptr1337

smirky

ptr1337

muncrief

> Can you explain this behaviour?

Yes
--
Alan

[Oh wait you want to know why...]

- Alan Cox on linux-kernel