Skip to content
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

Allow user to disable readahead by setting max-readahead smaller than blocksize #5229

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

polyrabbit
Copy link
Contributor

Allow user to disable read-ahead when he is doing random read - to reduce read amplification and improve read latency.

@jiefenghuang
Copy link
Contributor

jiefenghuang commented Oct 14, 2024

Perhaps a more explicit flag would be better, such as -1 to disable readahead.
related: #5224

@davies davies merged commit c011d62 into juicedata:main Oct 14, 2024
39 checks passed
@polyrabbit
Copy link
Contributor Author

I suppose it's better to measure max-readahead in blocks, not MiB, in consistent with the code logic.

Current value of max-readahead results in inconsistent readahead blocks:

max-readahead value readahead blocks
[blockSize, +inf) max-readahead/blockSize
(0, blockSize) 0
[0] 8

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.

3 participants