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

[Feature Request]: Evaluate using Link-Time Optimization (LTO) and Profile-Guided Optimization (PGO) for the Rust crates #2296

Open
zamazan4ik opened this issue Jun 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@zamazan4ik
Copy link

Describe the problem

It isn't a problem - just an idea of how the project performance can be improved.

Describe the proposed solution

I checked various compiler optimizations (like Link-Time Optimization (LTO) and Profile-Guided Optimization (PGO)) on many projects (including many databases like PostgreSQL, MongoDB, SQLite, ClickHouse, etc.) - all the results are available at https://github.com/zamazan4ik/awesome-pgo . Since such optimizations help with optimizing such projects, I think it can be an interesting idea to optimize the Rust parts of Chroma with LTO and PGO.

I can suggest the following ideas:

  • Enable LTO. It should improve the binary size and can improve the project's performance "for free". It can be enabled only for Release builds.
  • Perform PGO benchmarks with some typical workloads. If it shows improvements - add a note to the documentation about possible improvements in the database's performance with PGO.
  • More intensive testing Post-Link Optimization techniques (like LLVM BOLT) would be interesting too (Clang and Rustc already use BOLT as an addition to PGO). However, I recommend starting with the usual PGO since it's a much more stable technology with fewer limitations.

Alternatives considered

N/A

Importance

nice to have

Additional Information

I would be happy to answer all your questions regarding LTO, PGO and PLO.

@zamazan4ik zamazan4ik added the enhancement New feature or request label Jun 5, 2024
@HammadB
Copy link
Collaborator

HammadB commented Jun 18, 2024

This is a good tip! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants