Profile-Guided Optimization (PGO) results for NativeDB #92
zamazan4ik
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are available here. According to the tests, PGO can help with achieving better performance in many cases including databases like PostgreSQL, SQLite, ClickHouse, and many others. For databases, the results can be checked here. Since all of these, I think trying to optimize NativeDB with PGO can be a good idea.
I already did some benchmarks and want to share my results.
Test environment
main
branch on commitb8e156ef782828cc6992f499f0596f05ed6c2946
Benchmark
For benchmark purposes, I use this benchmark with
cargo bench
command. For PGO optimization I use cargo-pgo tool. The same benchmark suite was used for the PGO training phase built withcargo pgo bench
. PGO optimized results I got withcargo 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 NativeDB.
Further steps
I can suggest the following action points:
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.
I would be happy to answer all your questions about PGO.
Beta Was this translation helpful? Give feedback.
All reactions