envoyproxy / envoyproxy/envoy

Try to enable PGO

Open
#25,500 4 comments 0 reactions 0 assignees View on GitHub
area/build area/perf enhancement help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

*Title*: *Enable PGO for Envoy*

*Description*:
Profile-Guided Optimization (PGO) allows gaining additional performance for the software since it uses runtime profile information to perform more advanced optimization during the compilation process. I guess it could be useful for Envoy.

Possible steps:
* Prepare Envoy build with PGO and bench it compared to the non-PGO Envoy. I expect it will help to boost Envoy performance.
* At least consider adding PGO to CI. Yes, it has a LOT of caveats like a huge bump in a build time, good profile preparation, profile stability between releases, and much more other stuff but in my opinion, it could be worth it.
* For some users, who want "cheaply" try to boost their Envoy performance. Maybe will be a good idea to leave a note somewhere in the Envoy documentation about this "advanced" option?

Possible future steps for improving:

* Try to play with BOLT. BOLT also could help with gaining more performance even from LTO + PGO build (but it's not guaranteed). This way has drawbacks like BOLT on some platforms is too unstable; BOLT could not support some architectures, etc. But it definitely a good tool to think about :)

[optional *Relevant Links*:]
* Successful PGO case (there are a lot of others): https://github.com/vectordotdev/vector/issues/15631
* How to use PGO with Clang: https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.