-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Copy Lucene99FlatVectorsReader allowing direct IO to be specified directly #125921
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
Copy Lucene99FlatVectorsReader allowing direct IO to be specified directly #125921
Conversation
e39b14a
to
a9be5ea
Compare
server/src/main/java/org/elasticsearch/index/codec/vectors/es818/ES818FlatVectorsFormat.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/codec/vectors/es818/DirectIODirectory.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java
Outdated
Show resolved
Hide resolved
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @jimczi @benwtrent any concerns?
server/src/main/java/org/elasticsearch/index/codec/vectors/es818/ES818FlatVectorsFormat.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/codec/vectors/es818/ES818FlatVectorsFormat.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/codec/vectors/es818/ES818FlatVectorsReader.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java
Show resolved
Hide resolved
@thecoop The use of direct I/O for BBQ rescoring by default is good 👍. However, there can be some cases where there is sufficient RAM available which could be somewhat negatively affected by this change - the float32 vectors would eventually become fully paged into memory. Let's add a system property that allows to revert to the previous behaviour. That way, for some narrow set of environments, a user could restore the previous behaviour. |
Is there a way to detect if we do actually have enough memory to keep all the floats paged in? Or will that come later with the memory usage monitoring? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Copy and modify Lucene99FlatVectorsReader allowing direct IO to be used for raw vector data.
This has a 10-15% increase in performance on searches for the so_vector rally track, but a few tests have dropped ~10% (knn-search-10-50-match-all, knn-search-10-50-css, knn-search-10-50-match-all-force-merge)