g3 icon indicating copy to clipboard operation
g3 copied to clipboard

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT

Open zamazan4ik opened this issue 8 months ago • 1 comments

Hi!

Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are here. E.g. PGO helps with optimizing Envoyproxy. PGO results for other proxies like HAProxy, Nginx, httpd you can be found in the repo above. According to the multiple tests, PGO can help with improving performance in many other cases. That's why I think trying to optimize g3 with PGO can be a good idea.

I can suggest the following action points:

  • Perform PGO benchmarks on g3. And if it shows improvements - add a note about possible improvements in g3 performance with PGO.
  • Providing an easier way (e.g. a build option) to build scripts with PGO can be helpful for the end-users and maintainers since they will be able to optimize g3 according to their own workloads.
  • Optimize pre-built binaries

Maybe testing Post-Link Optimization techniques (like LLVM BOLT) would be interesting too (Clang and Rustc already use BOLT as an addition to PGO) but I recommend starting from the usual PGO.

For the Rust projects, I recommend starting experimenting with PGO with cargo-pgo.

Here are some examples of how PGO optimization is integrated in other projects:

zamazan4ik avatar Oct 19 '23 23:10 zamazan4ik