inlinedio / ikv-store

High-performance key-value store for ML inference. 100x faster than Redis.
https://inlined.io/
MIT License
201 stars 5 forks source link

Evaluate using Profile-Guided Optimization (PGO) for optimizing the IKV performance #143

Open zamazan4ik opened 3 months ago

zamazan4ik commented 3 months ago

Hi!

I collect materials about applying Profile-Guided Optimization (PGO) to different applications in different software domains - all my results are available at https://github.com/zamazan4ik/awesome-pgo . According to my tests, PGO helps with achieving better performance in different areas, including many databases.

I think it will be interesting to see PGO results for IKV in benchmarks since according to my tests, even Redis performance can be improved with PGO (the results are available in the repo above).

Please do not treat the issue as a bug - it's an improvement idea.

pushkarmoi commented 3 months ago

Hi @zamazan4ik thanks for reaching out. What tooling do you suggest for analyzing IKV performance (read perf in particular). IKV users use Java/Go/Python client libraries to talk to IKV core (Rust). So there is some foreign func interface interaction, followed by some hashmap + mmap lookups in ikv core, then response preparation (some ser-deserialization).

zamazan4ik commented 3 months ago

As far as I see, you already have some benchmarks. You can try to use them to measure performance improvement from enabling PGO compared to usual Release build.

pushkarmoi commented 3 months ago

https://doc.rust-lang.org/rustc/profile-guided-optimization.html Taking a look at this^. Will try with the benchmark workload like you suggested