-
Notifications
You must be signed in to change notification settings - Fork 95
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
Do not tune down write-amp based rate limit when flush flow decreases #234
Conversation
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
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.
rest LGTM
Signed-off-by: tabokie <xy.tao@outlook.com>
Pin @yiwu-arbug |
// Only adjust threshold when foreground write (flush) flow increases, | ||
// because decreasement could also be caused by manual flow control at | ||
// application level to alleviate background pressure. | ||
new_bytes_per_sec = std::max( |
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.
so when foreground flow decreases, we use long term average throughput as new rate limit? just want to understand the logic.
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.
Yes, and this is consistent with before:
When flush flow is steady, i.e. flush_flow.full() == flush_flow.recent(),
old algorithm yields new_bytes_per_sec = ratio * flush_flow.recent() = compaction_flow.full() / flush_flow.full() * flush_flow.recent() = compaction_flow.full()
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
…tikv#234) Because foreground writes can be proactively restrained when compactions lag behind, added a minor algorithm change that avoids tuning down rate limit when foreground writes (flush flow) decrease. This will not affect the overall performance of `WriteAmpBasedRateLimiter`. Signed-off-by: tabokie <xy.tao@outlook.com>
…#234) Because foreground writes can be proactively restrained when compactions lag behind, added a minor algorithm change that avoids tuning down rate limit when foreground writes (flush flow) decrease. This will not affect the overall performance of `WriteAmpBasedRateLimiter`. Signed-off-by: tabokie <xy.tao@outlook.com>
Because foreground writes can be proactively restrained when compactions lag behind, added a minor algorithm change that avoids tuning down rate limit when foreground writes (flush flow) decrease. This will not affect the overall performance of
WriteAmpBasedRateLimiter
.