Profile-Guided Optimization (PGO) benchmark report #6500
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!
I decided to test the Profile-Guided Optimization (PGO) technique to optimize the library performance. For reference, results for other projects are available at https://github.com/zamazan4ik/awesome-pgo . Since PGO has helped many different libraries (like Apache Datafusion results), I decided to apply it to
arrow-rs
to see if a performance win (or loss) can be achieved. Here are my benchmark results.This information can be interesting for anyone who wants to achieve more performance with the library in their use cases.
Test environment
arrow-rs
version:master
branch,3293a8c2f9062fca93bee2210d540a1d25155bf5
commitBenchmark
For PGO optimization I use cargo-pgo tool. Release bench results I got with
taskset -c 0 cargo bench
command. The PGO training phase is done withtaskset -c 0 cargo pgo bench
, PGO optimization phase - withtaskset -c 0 cargo pgo optimize bench
.taskset -c 0
is used to reduce the OS scheduler's influence on the results. All measurements are done on the same machine, with the same background "noise" (as much as I can guarantee).Results
I got the following results:
According to the results we can see, that in many cases performance was measurably improved. However, for other cases we also see regressions. It's completely fine since the training dataset tries to cover all possible cases and sometimes the compiler cannot find the optimization decision for all cases.
It's still a good result since it proves that in some scenarios users can achieve better performance for
arrow-rs
with PGO.Further steps
At the very least, the library's users can find this performance report and decide to enable PGO for their applications if they care about the library's performance in their workloads. Maybe a small note somewhere in the documentation (the README file?) will be enough to raise awareness about this possible performance improvement.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions