Google Updates Patches For AutoFDO+Propeller Optimized Linux Kernel

Written by Michael Larabel in Linux Kernel on 3 October 2024 at 06:48 AM EDT. 8 Comments
LINUX KERNEL
Google engineers have been working on support for the Linux kernel to leverage AutoFDO feedback directed optimizations and Propeller optimizations when compiling the Linux kernel with LLVM/Clang. In turn this can help Linux systems see 2~10% better performance thanks to the more optimized kernel.

Back during the summer was the initial AutoFDO and Propeller patches for the Linux kernel. Yesterday a second iteration of the patches were posted by Google engineer Rong Xu. Rong Xu sums up the work well in the patch cover letter:
"This patch series is to integrate AutoFDO and Propeller support into the Linux kernel. AutoFDO is a profile-guided optimization technique that leverages hardware sampling to enhance binary performance. Unlike Instrumentation-based FDO (iFDO), AutoFDO offers a user-friendly and straightforward application process. While iFDO generally yields superior profile quality and performance, our findings reveal that AutoFDO achieves remarkable effectiveness, bringing performance close to iFDO for benchmark applications.

Propeller is a profile-guided, post-link optimizer that improves the performance of large-scale applications compiled with LLVM. It operates by relinking the binary based on an additional round of runtime profiles, enabling precise optimizations that are not possible at compile time. Similar to AutoFDO, Propeller too utilizes hardware sampling to collect profiles and apply post-link optimizations to improve the benchmark’s performance over and above AutoFDO.

Our empirical data demonstrates significant performance improvements with AutoFDO and Propeller, up to 10% on microbenchmarks and up to 5% on large warehouse-scale benchmarks. This makes a strong case for their inclusion as supported features in the upstream kernel."

In addition to the 5~10% performance benefit summary, the patch cover letter goes on to note more details into the benchmark benefits of these optimizations:
"Experiments were conducted to compare the performance of AutoFDO-optimized kernel images (version 6.9.x) against default builds.. The evaluation encompassed both open source microbenchmarks and real-world production services from Google and Meta. The selected microbenchmarks included Neper, a network subsystem benchmark, and UnixBench which is a comprehensive suite for assessing various kernel operations.

For Neper, AutoFDO optimization resulted in a 6.1% increase in throughput and a 10.6% reduction in latency. Unixbench saw a 2.2% improvement in its index score under low system load and a 2.6% improvement under high system load."

There are also more details on the performance benefits within this LLVM Discourse post.

FDO benefits benchmarks


With the new v2 patches there are various code improvements, fixes, and other minor changes. Here's to hoping this AutoFDO and Propeller support make it into the mainline Linux kernel soon for helping to squeeze even more performance out of Linux systems.
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