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

Using Profile-Guided Optimization (PGO) to reduce the encode overhead even more #50

Open
zamazan4ik opened this issue Jan 10, 2024 · 0 comments

Comments

@zamazan4ik
Copy link

Hi!

Similarly to vincent-herlemont/native_db#92 I decided to perform PGO benchmarks on native_model. Here are the results.

Test environment

  • Fedora 39
  • Linux kernel 6.6.9
  • AMD Ryzen 9 5900x
  • 48 Gib RAM
  • SSD Samsung 980 Pro 2 Tib
  • Compiler - Rustc 1.75
  • native_model version: the latest for now from the main branch on commit 62b1e7cc35e64bce9feb22d6727a4f66fc9b9660
  • Disabled Turbo boost (for more stable results across benchmark runs)

Benchmark

For benchmark purposes, I use built-in benchmarks with cargo bench command. For PGO optimization I use cargo-pgo tool. The same benchmark suite was used for the PGO training phase built with cargo pgo bench. PGO optimized results I got with cargo pgo optimize bench.

All measurements are done multiple times to check reproducibility - the results are stable across runs.

Results

I got the following results:

At least according to the results above, PGO helps with achieving better overall performance with native_model. Probably the PGO-optimized build can suggest a way how to optimize native_model more aggressively (via comparing ASM for PGOed and non-PGOed native_model versions).

Further steps

I can suggest the following action points:

  • Perform more PGO benchmarks on native_model. If it shows improvements - add a note to the documentation about possible improvements in native_model performance with PGO. So native_model users will be aware of PGO effects on native_model performance and can decide to enable PGO for their native_model-based applications to achieve better performance.

Please treat the issue just as a benchmark report, not a problem or something like that. I created the issue just because the discussions are not enabled in this repo.

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

1 participant