Google Updates Patches For AutoFDO+Propeller Optimized Linux Kernel
([Linux Kernel] 5 Hours Ago
Faster Performance)
- Reference: 0001495596
- News link: https://www.phoronix.com/news/Linux-AutoFDO-Prop-v2
- Source link:
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 [1]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 [2]this LLVM Discourse post .
With the new [3]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.
[1] https://www.phoronix.com/news/AutoFDO-Propeller-Kernel
[2] https://discourse.llvm.org/t/optimizing-the-linux-kernel-with-autofdo-including-thinlto-and-propeller/79108
[3] https://lore.kernel.org/lkml/20241002233409.2857999-1-xur@google.com/
Back during the summer was the initial [1]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 [2]this LLVM Discourse post .
With the new [3]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.
[1] https://www.phoronix.com/news/AutoFDO-Propeller-Kernel
[2] https://discourse.llvm.org/t/optimizing-the-linux-kernel-with-autofdo-including-thinlto-and-propeller/79108
[3] https://lore.kernel.org/lkml/20241002233409.2857999-1-xur@google.com/
ahrs