A note about Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) #68
Replies: 3 comments 3 replies
-
Thanks for the update that's awesome. I'll take another look (FWIW, TB releases are still being built with 1.86, since I had issues with 1.87 for mac arm (funnily x86 was fine) and windows builds) 🙏 |
Beta Was this translation helpful? Give feedback.
-
A "quick" test and painfully slow rebuilds later, I can report that I was able to build an instrumented binary with fat LTO, collect some profiles, ... but when building an optimized binary I'm still seeing linker issues:
|
Beta Was this translation helpful? Give feedback.
-
Update: I was able to build an optimized build with "thin" LTO (all feels still more brittle than it should). Some more testing will be needed to establish whether (no-PGO and fat LTO) or (PGO with thin LTO) is faster. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
In https://github.com/trailbaseio/trailbase/blame/main/Cargo.toml#L40 I found an interesting comment about LTO + PGO. This bug is already fixed in the Rustc upstream: rust-lang/rust#115344 .So since Rust 1.87 (AFAIK) you can use LTO with PGO. I think it could be interesting to give PGO one more try with Trailbase.
Additionally, I propose to test Post-Link Optimization (PLO) on the project with tools like LLVM BOLT - it can bring performance improvements even after applying PGO. However, I recommend starting with PGO since PGO is more stable technology right now.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions