-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Evaluate Profile-Guided Optimization (PGO) #2354
Comments
This sounds interesting, thank you for raising this issue 👍 What do you miss or need to be able to try |
I've created the issue as an idea to try PGO on Qdrant. Regarding applying PGO to Qdrant, if https://github.com/qdrant/qdrant/tree/master/benches benchmarks have good coverage from the Qdrant functionality perspective, I think we can try to test PGO on it. The only thing I miss is free time to do it :) (since I am working on enabling PGO for multiple projects). |
I did not mean to put you under pressure to get it done 👍
It seems you have much more experience with PGO than us for the time being so your input is very valuable. I think it would help to prioritize this work to have a basic experiment demonstrating how much it costs to setup/maintain for which potential performance gain. |
Well, if we are going to use benchmarks as a PGO training and evaluation set, I need to understand how to run the benchmarks with Qdrant. Are they integrated via |
We use |
Well, at least
As far as I see in https://github.com/qdrant/qdrant/blob/master/benches/search-points/search-points.sh , the benchmarks should be run in a different way:
Maybe, I will try to do it a bit later :) |
Then |
Yeah, it definitely should :) The problem is that https://github.com/Kobzol/cargo-pgo relies on |
If you step into the lib crates, you can run benchmarks directly. cd lib/segment
cargo bench --bench hnsw_build_graph |
@agourlay During testing on Macbook M1 with macOS 13.4 (Ventura) and Qdrant from
|
I benchmarked The results are the following (in
According to these microbenchmarks, PGO helps with achieving better performance in almost all cases. However, would be much more interesting to test Qdrant itself with PGO. Additionally, I want to highlight, that some used by Qdrant 3rd-parties could be optimized with PGO as well. For E.g. RocksDB as a C++ dependency will not be optimized with |
Thanks for the deep investigation 👍 FYI we have finally fixed the panic in the |
Hi!
There is an idea that PGO could help with improving performance even more! There are a lot of examples of different software, where PGO helps a lot with performance - you can check it here. E.g. in this list are a lot of databases like PostgreSQL and ClickHouse.
There are several options. I'd appreciate it if you could provide an easy way to build Qdrant with PGO. And experienced users will be able to do it on their own for their own usage scenarios. Another option is to optimize Qdrant build with a generic-enough profile. Providing PGO-optimized binaries could be a trickier task (since it requires preparing a good-enough profile) but as an option would be great to see too. Another idea of how to use PGO - optimize your own cloud-based Qdrant installation.
As an additional optimization way, I suggest taking a look at LLVM BOLT. But from my experience, it would be better to start with PGO and then try to use BOLT.
For the Rust projects, I recommend starting with cargo-pgo.
The text was updated successfully, but these errors were encountered: