test(bench): sustained-duration measurement for MemWAL HNSW parity bench#7010
Merged
Merged
Conversation
Add --insert-seconds (rebuild the graph in a loop) and --query-seconds (loop the query workload) to both the Lance and hnswlib HNSW benches so throughput reflects steady-state under continuous AVX-512 load rather than a short burst, plus an insert_core breakdown that times insertion separately from per-build graph allocation/teardown. The parity-suite driver gains INSERT_SECONDS/QUERY_SECONDS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@jackye1995 ping for review. Bench-only follow-up to #7009: adds 30s sustained read/write measurement + insert_core breakdown. Latest results in the description — sustained read at parity (0.99-1.01x), insertion compute at parity (0.96-0.99x); the end-to-end write gap at scale is purely graph alloc/teardown (allocator-sensitive: mimalloc/jemalloc make Lance faster), not the algorithm. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds sustained-duration measurement to the MemWAL HNSW parity bench so it reports steady-state throughput under continuous load rather than a short burst. This follows up the AVX-512 distance work in #7009.
Changes (bench-only, no library changes):
--insert-seconds/--query-seconds: run the write (graph build) and read (query) workloads in a loop for a fixed wall-clock duration; report aggregate throughput over all passes (insert_passes/query_passes).insert_corebreakdown: times the insertion itself separately from per-build graph allocation + teardown.run_parity_suite.shgainsINSERT_SECONDS/QUERY_SECONDS.Motivation: a sub-second query window gave noisy/optimistic numbers and hid AVX-512 frequency throttling. Measuring 30 s of continuous load makes read/write parity (and where it doesn't hold) reproducible.
Latest perf results (merged main, c7i.12xlarge, 48 threads, dim=1024, m=12, ef=64, k=10)
Sustained 30 s read + 30 s write per size; AVX-512 throttles 3.78 GHz → ~2.5 GHz under all-core load (affects both impls).
Read (query_qps), Lance / hnswlib:
Write — insertion compute only (
insert_core), Lance / hnswlib:Write — end-to-end incl. per-build graph alloc + teardown:
Takeaways the improved bench makes visible:
Vec/Mutex/Arcvs hnswlib's flat arrays), not the algorithm — and it's allocator-sensitive: with mimalloc/jemalloc as the global allocator Lance is actually faster than hnswlib (≈1.08–1.25×). No in-tree change is warranted; using a modern allocator for the memtable workload closes it.cc @jackye1995 — please review.