Skip to content

DiskBBQ Prefetch vectors during merge #132958

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

benwtrent
Copy link
Member

This helps immensely in lower memory environments, helping merging significantly.

I chose 4 at a time as that seemed better than 1, and not too extreme. I could be convinced to go higher. I didn't really benchmark higher values (I can do that if necessary).

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Aug 14, 2025
Comment on lines +397 to +399
for (int o : ord) {
vectors.prefetch(o * vectorLength, vectorLength);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

All this change for these three lines...LOL

Copy link
Contributor

@john-wagster john-wagster left a comment

Choose a reason for hiding this comment

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

might be good to have some benchmarks here to validate both low and high memory scenarios, but I think it's likely fine. I'm good with this and didn't see any glaring issues. lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants