Skip to content

Conversation

xzfc
Copy link
Contributor

@xzfc xzfc commented Jun 30, 2025

It turned out that that OldIndexCandidate::evaluate() could perform a lot of random IO reads when the disk cache doesn't fit all of the the non-quantized vectors. Given that HNSWIndex::build() holds CPU permit and no IO permit, this situation could lead to sub-optimal IO/CPU scheduling.

In this PR vector comparison (via vector storage) is replaced with version comparison (via ID tracker).

@xzfc xzfc requested a review from generall June 30, 2025 16:45

This comment was marked as resolved.

Copy link
Member

@timvisee timvisee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! Using the point version sounds good to me.

@xzfc xzfc merged commit 038850a into dev Jul 2, 2025
27 of 28 checks passed
@xzfc xzfc deleted the hnsw-incremental-compare-versions branch July 2, 2025 21:08
generall pushed a commit that referenced this pull request Jul 17, 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.

2 participants