-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Set ReadAdvice#NORMAL
on files that have a forward-only access pattern.
#13450
Conversation
…ess pattern. This introduces a new API that allows directories to optimize access to `IndexInput`s that have a forward-only access pattern by reading ahead of the current position. It would be applicable to: - Postings lists, - Doc values, - Norms, - Points. Relates apache#13179
} | ||
// TODO: Is there a hint we can give to the OS to let it optimize for our forward-only access | ||
// pattern in the given range? | ||
} |
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.
MADV_SEQUENTIAL
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.
or even better, MADV_NORMAL
for the range, which is less aggressive.
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.
I thought you had concerns about MADV_NORMAL
but I like it better too, I updated the PR to use ReadAdvice.NORMAL
instead.
This reverts commit 8375caf.
…only access pattern." This reverts commit 8a5cb8f.
…ern. This applies to files where performing readahead could help: - Doc values data (`.dvd`) - Norms data (`.nvd`) - Docs and freqs in postings lists (`.doc`) - Points data (`.kdd`) Other files (KNN vectors, stored fields, term vectors) keep using a `RANDOM` advice.
IndexInput
about slices that have a forward-only access pattern.ReadAdvice#NORMAL
on files that have a forward-only access pattern.
This applies to files where performing readahead could help:
.dvd
).nvd
).doc
).kdd
)Other files (KNN vectors, stored fields, term vectors) keep using a
RANDOM
advice.