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

Profile-Guided Optimization (PGO) performance results #19

Open
zamazan4ik opened this issue Nov 1, 2023 · 1 comment
Open

Profile-Guided Optimization (PGO) performance results #19

zamazan4ik opened this issue Nov 1, 2023 · 1 comment
Assignees
Labels

Comments

@zamazan4ik
Copy link

Hi!

Recently I did many Profile-Guided Optimization (PGO) benchmarks on multiple projects - the results are available here. I think since the project is performance-oriented, it would be interesting to try to test PGO for optimizing tquic. I already did some benchmarks.

Test environment

  • Fedora 38
  • Linux kernel 6.5.5
  • AMD Ryzen 9 5900x
  • 48 Gib RAM
  • SSD Samsung 980 Pro 2 Tib
  • Compiler - Rustc 1.73
  • tquic version: the latest for now from the develop branch on commit 05c56e7425ec1149a9c95ca7bbcb6acbab861fd6
  • Disabled Turbo boost

Benchmark setup

For benchmarking purposes, I use the project's benchmarks. Release benchmarking is done with cargo bench, PGO optimized build is done with cargo-pgo with cargo pgo bench && cargo pgo optimize bench. PGO profiles are collected from the benchmark workload itself.

Results

I got the following results:

According to the tests, PGO consistently improves tquic performance in some scenarios.

Further steps

I can suggest the following things to do:

  • Evaluate PGO's applicability to tquic in more scenarios.
  • If PGO helps to achieve better performance - add a note to tquic's documentation about that (probably somewhere in the README file). In this case, users and maintainers will be aware of another optimization opportunity for tquic.
  • Maybe get some insights from the PGO profiles and optimize manually the code according to the profiles (maybe more aggressive inlining or something like that)
@iyangsj
Copy link
Collaborator

iyangsj commented Nov 2, 2023

@zamazan4ik Thank you for your suggestion. I truly appreciate your expertise in performance optimization and your recommendation to use Profile-Guided Optimization (PGO).

We will consider this approach and assess the benefits and potential impact on our production environment. I would love to discuss this further with you when we make new progress. Your insights would be invaluable to us.

Thank you again for your invaluable suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants