Google's AutoFDO & Propeller For The Linux Kernel Helps With Up To 5~10% Faster Performance

Written by Michael Larabel in Google on 30 July 2024 at 08:25 AM EDT. 9 Comments
GOOGLE
Google engineer Rong Xu has proposed adding AutoFDO and Propeller support to the mainline Linux kernel for its Clang-based build as it can help the system performance improve in the up to 5~10% range.

AutoFDO is a Google project for Automatic Feedback-Directed Optimization with LLVM/Clang. Google's Propeller is of a similar focus as a profile-guided relinking optimizer for application software... or with these patches, the Linux kernel. These are compiler-based optimization techniques for generating faster binaries and Google has found combining AutoFDO and Propeller to be worthwhile for Linux kernel images.

Rong Xu explains in the patch series sent out this week:
"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. 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.
...
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."

AutoFDO relies on feedback from the CPU's Performance Monitoring Unit (PMU) to collect profiling data. Unlike other FDO techniques, AutoFDO does not rely on instrumented kernels with a single optimized kernel serving for both execution and profile collection.

Given these gains and AutoFDO / Propeller being more straight-forward than some other compiler optimization techniques, hopefully these patches stand chances of being mainlined in the future.

Berlin fire man at Kunsthaus Tacheles


It's great seeing Google's continued efforts for enhancing the performance of the upstream Linux kernel.

The patches and more details on this proposal can be found via this patch series.
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