When more and more software vendors are adopting link-time optimizations (LTO, link-time optimizations) and profile-guided optimizations (PGO, profile-guided optimizations) to use compilers to extract performance, Microsoft engineers are working on the Linux kernel for personal use. Explore LTO+PGO to achieve better Linux performance.
The use of link-time optimization on the Linux kernel is not a new concept. In the past, many manufacturers have released LTO patches for the Linux kernel, but they usually do not bring much change. Previously, Linus Torvalds and others have been dissatisfied with the Linux kernel that supports LTO, partly because of the poor status of GCC’s LTO in the past. But now with the development of modern GCC compilers (and Clang), LTO has gradually become better. Fedora uses LTO by default when packaging their distribution installation packages, and companies like Clear Linux use AutoFDO ( Based on the feedback compilation optimization of program performance analysis tools) to further improve the performance of its release.
In contrast, the use of configuration file boot optimization on the Linux kernel is relatively rare. Because the configuration file guide optimization completely depends on the configuration file, it is fed back to the compiler to help it perform optimization heuristic processing. Therefore, for actual use, the accuracy of the configuration file is very important. Considering that the workloads seen on Linux are very diverse, as well as a variety of different hardware and drivers, it is difficult to generate configuration files that are useful for PGO, can be widely used, and can help most users. Task. Therefore, the PGO in the Linux kernel is more for individual users/organizations. They can adopt PGO and make adjustments according to their actual conditions.
Microsoft Software Engineering Manager Ian Bearman introduced their exploration of Linux kernel configuration file boot optimization at the Linux Plumbers conference held this week.
” data-original=”https://img.ithome.com/newsuploadfiles/2020/8/20200828091712_6762.jpg” />
Their interest in PGO stems from “internal customer requirements” for Linux performance. But then again, Microsoft’s commitment to optimizing Linux performance now does not seem to be a strange thing. Another Microsoft engineer was a contributor to the development of the FSGSBASE patch and was finally incorporated into Linux Kernel 5.9.
Redis is one of the public cases that they have been showing to explore the use of PGO in the kernel and benefit from it.
” data-original=”https://img.ithome.com/newsuploadfiles/2020/8/20200828091712_7233.jpg” />
Microsoft will continue to explore PGO for the Linux kernel. Interestingly, people find that Windows does use LTO + PGO extensively. It is said that in the Windows instance, they saw the performance of these compiler optimizations increased by 5~20%, presumably they used their own MSVC compiler.
For more such interesting article like this, app/softwares, games, Gadget Reviews, comparisons, troubleshooting guides, listicles, and tips & tricks related to Windows, Android, iOS, and macOS, follow us on Google News, Facebook, Instagram, Twitter, YouTube, and Pinterest.