Evaluate using more optimizations like Link-Time Optimization (LTO) and Profile-Guided Optimization (PGO) for Rust part #2609
zamazan4ik
started this conversation in
Ideas
Replies: 2 comments
-
|
Hi @zamazan4ik, thanks that's a nice idea. I'll make an issue for it if you don't mind, so we can evaluate the impact on compile time vs. e2e performance. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@zamazan4ik , thin LTO is enabled by default in the release profile in Rust. Fat LTO makes compilation too slow for our use case without adding much performance. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I noticed that in the
Cargo.tomlfile Link-Time Optimization (LTO) for the Rust part of the project is not enabled. I suggest switching it on since it will reduce the binary size (always a good thing to have) and will likely improve the project's performance.I suggest enabling LTO only for the Release builds so as not to sacrifice the developers' experience while working on the project since LTO consumes an additional amount of time to finish the compilation routine. If you think that a regular Release build should not be affected by such a change as well, then I suggest adding an additional
release-ltoprofile where additionally to regularreleaseoptimizations LTO also will be added. Such a change simplifies life for maintainers and others interested in the project persons who want to build the most performant version of the application. Using ThinLTO also should help).Additionally to LTO, I can suggest evaluating more advanced optimizations like Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO). I have a lot of information (including a lot of benchmarks for many projects, including many databases!) in my repository: https://github.com/zamazan4ik/awesome-pgo . I expect measurable improvements from enabling PGO for Feldera. You can start to play with PGO with https://github.com/Kobzol/cargo-pgo
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions