Expand using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) for CBL-Mariner packages #8072
Unanswered
zamazan4ik
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Now I am investigating PGO and PLO effects on different kinds of software - all my current results are available at https://github.com/zamazan4ik/awesome-pgo. According to these results, enabling PGO and PLO can help with achieving better overall performance in many cases for many applications. I think expanding PGO and PLO usage for the CBL-Mariner packages would be a good idea since it could help to achieve better software performance and lower energy usage for CBL-Mariner users.
Profile-Guided Optimization (PGO)
PGO is already a well-known technique. All currently known PGO effects on performance can be found at https://github.com/zamazan4ik/awesome-pgo#pgo-showcases . Several OS distros already enabled PGO for some packages like GCC, Rustc, Chromium, Firefox, and others (it depends on each OS distro, of course).
I think we can try to expand PGO usage across CBL-Mariner packages. I think we can start by enabling PGO at least for the following projects (these packages are already PGO-optimized in many OS distros):
rustc
)I am sure it's possible to find more packages with upstream PGO support or for which enabling PGO could be an interesting option - all known for me PGO optimization results are available at https://github.com/zamazan4ik/awesome-pgo#pgo-showcases . Maybe for some packages PGO is already enabled in CBL-Mariner spec files - didn't check that yet.
As an example, PGO is already used in other Linux distributions in the Fedora's Rust package: link.
Post Link Optimization (PLO)
Regarding Post Link Optimization (PLO), right now there are two main tools - LLVM BOLT and Google Propeller.
According to the Facebook Research Paper (https://research.facebook.com/publications/bolt-a-practical-binary-optimizer-for-data-centers-and-beyond/), LLVM BOLT (https://github.com/llvm/llvm-project/blob/main/bolt/README.md) helps with achieving better performance for various packages like compilers and interpreters. I think it would be a good idea to enable LLVM BOLT for some packages to deliver faster binaries for users (since Propeller is less stable right now in my opinion).
Here I got some examples of how LLVM BOLT is already integrated into other projects:
librustc_driver.so
with BOLT rust-lang/rust#116352So at least for the projects above LLVM BOLT effects are tested and some preparations are already done in the upstream projects. In this case, it should be easier to enable BOLT for these packages.
For some projects right now there is ongoing work on integrating LLVM BOLT into the build scripts:
More about LLVM BOLT performance results for other projects can be found in:
librustc_driver.so
with BOLT rust-lang/rust#116352Some OS already using LLVM BOLT in their build scripts - check Clang recipe in Solus.
I don't create an issue per project (like "Enable BOLT for Clang", "Enable PGO for GCC", etc.) since I think first we need to discuss the approach. If we agree with enabling BOLT or expanding PGO usage for some packages, then we can create additional issues (and use this issue as a meta issue). Here we can discuss general approaches regarding PGO and PLO usage in CBL-Mariner.
Beta Was this translation helpful? Give feedback.
All reactions