Skip to content
New issue

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

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

Already on GitHub? # to your account

[FEATURE] Evaluate using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) #3261

Open
zamazan4ik opened this issue Nov 29, 2023 · 0 comments

Comments

@zamazan4ik
Copy link

Is your feature request related to a problem? Please describe.
Not exactly a problem. Just an idea of how to possibly improve the OpenSIPS performance.

Describe the solution you'd like

Recently I checked Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) improvements on multiple projects. The results are available here. According to the tests, these optimizations can help with achieving better performance in many cases for many applications: networking apps like HAproxy and Envoy, many databases (could be useful for cached), parsing utilities like Vector, etc. Since this, I think trying to optimize OpenSIPS with PGO and PLO can be a good idea. Having faster OpenSIPS can help with serving more users per CPU core with OpenSIPS and reduce Total Cost of Ownership (TCO) for the solution.

Implementation

I can suggest the following action points:

  • Perform PGO benchmarks on OpenSIPS. If it shows improvements - add a note to the documentation about possible improvements in OpenSIPS 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 OpenSIPS according to their workloads.
  • Optimize pre-built OpenSIPS binaries

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.

Describe alternatives you've considered
Do not use PGO and PLO optimizations and possibly miss some performance.

Additional context

Here I collected several PGO-related links (more PGO-related materials available at https://github.com/zamazan4ik/awesome-pgo/).

Examples of how PGO optimization is integrated into other projects:

I have some examples of how PGO information looks in the documentation:

Regarding LLVM BOLT integration, I have the following examples:

I hope these ideas could be interesting for someone from the OpenSIPS community.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants