Skip to content

Update hnsw_search_graph benchmark#5666

Merged
xzfc merged 2 commits intodevfrom
links-comp-benchmark
Dec 18, 2024
Merged

Update hnsw_search_graph benchmark#5666
xzfc merged 2 commits intodevfrom
links-comp-benchmark

Conversation

@xzfc
Copy link
Member

@xzfc xzfc commented Dec 17, 2024

Depends on #5492. Review only the last two commits.

This PR updates hnsw_search_graph benchmark to make it convenient to benchmark changes in the compression implementation.

  • Uncompressed HNSW links are cached and preserved across benchmark runs, so you don't have to wait each time you run the benchmark.
  • Cache file name: target/tmp/segment/hnsw_search_graph/1000000-64-16-100-true-Cosine.links.
    • Since HNSW parameters are part of the file name, the index is properly invalidated if you change them.
    • Caveat: the vectors are not saved. So the results will be garbage if you change the vectors generation code or seed without manually cleaning the cache. Tho I believe that it will be changed rarely (or never).
  • HNSW is built in parallel and the progress is shown using indicatif crate.
  • Benchmarks are renamed, and a compressed benchmark is added.
    • Old names: hnsw-index-search-group/{hnsw_search,plain_search}.
    • New names: hnsw-search-graph/{uncompressed,compressed,plain}.
  • NUM_VECTORS increased from 100_000 to 1_000_000 since wait times are not a problem now.

@xzfc xzfc merged commit 6d9c412 into dev Dec 18, 2024
@xzfc xzfc deleted the links-comp-benchmark branch December 18, 2024 21:02
timvisee pushed a commit that referenced this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants