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

fix readahead bug then trying to turn off readahead totally #5547

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

Conversation

timurvankov
Copy link

When you try to turn off readahead, you still get traffic you don't expect.
in this fix we limit readaheadMax to zero in case any readahead is turned off.

The question remains what is the expected behavior in the case of the max-readahead==0 parameter

@polyrabbit
Copy link
Contributor

Could you elaborate the bug?

Setting --max-readahead smaller than blocksize will disable readahead, as implemented in #5229 .

@timurvankov
Copy link
Author

yes, it's true, but if you set 0, the behavior is unexpected, I expected it to be 0 and not block_size * 8. in fact, in general, this is a useless parameter in the end, since in the end, the entire block is going through the network anyway in asynchronous mode for caches

@jiefenghuang
Copy link
Contributor

hi @timurvankov
The default behavior of 0 is 8 blocks to maintain compatibility with the behavior of the previous version.
Here are some potential optimizations:

  1. Set readahead based on blocks, as mentioned by @polyrabbit here: Allow user to disable readahead by setting max-readahead smaller than blocksize #5229 (comment)
  2. Keep the default value of the parameter at 8 blocks.

Copy link
Contributor

@jiefenghuang jiefenghuang left a comment

Choose a reason for hiding this comment

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

TBD

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