Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #126

Open
zamazan4ik opened this issue Oct 19, 2023 · 1 comment
Open

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #126

zamazan4ik opened this issue Oct 19, 2023 · 1 comment
Milestone

Comments

@zamazan4ik
Copy link

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:

@zh-jq-b
Copy link
Member

zh-jq-b commented Oct 20, 2023

Thank you for bring this up.

PGO will be on our roadmap next year (2024).

There are some steps to do:

  1. Add testcases for profile purpose, may be based on the ones in scripts/coverage dir.
  2. Enable PGO for rust code, and do a benchmark test.
  3. Enable PGO when compile the vendored c source code such openssl or c-ares, then do a benchmark test.
  4. Add guides for users.

@zh-jq-b zh-jq-b added this to the g3proxy v1.10 milestone Jul 3, 2024
@zh-jq-b zh-jq-b modified the milestones: g3proxy v1.10, g3proxy v1.12 Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants