-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add threshold for each unload round for uniform load shedder #13915
Add threshold for each unload round for uniform load shedder #13915
Conversation
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
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.
Questions I hope you answer:
- Whether this change should notify the users ?
- Can
MAX_UNLOAD_PERCENTAGE
,MIN_UNLOAD_THROUGHPUT
andMIN_UNLOAD_MESSAGE
be customized by users?
Thanks!
f70731b
to
b001103
Compare
@mattisonchao Thanks for your review. The feature was added in pulsar 2.10.0, and we will add doc to explain the unload strategy. For the default values, in most of cases, we don't need to change it, so we can make them default first aiming to make |
I see. |
…13915) ### Motivation For current uniform load shedder, it will unload 50% of (max throughput - min throughput) or (max message rate - min message rate). If the max throughput is 500MB/s, and the min throughput is 0MB/s, it will unload 250MB/s throughput at a time, which will lead the broker into high load for unloading a lot of bundles and cause the broker unstable. Another problem is that the current implementation has no min unload threshold limit. For example, if the max broker throughput is 1MB/s and the min broker throughput is 0MB/s, it will unload 0.5MB/s throughput from the max throughput broker, which is unnecessary and will cause bundle frequently unload. ### Modification Change the default unload percentage from 50% to 20%, aiming to make the unload process smooth. Add MIN_UNLOAD_MESSAGE=1000 and MIN_UNLOAD_THROUGHPUT=1 * MB, which will skip the low throughput bundle unload and decrease the bundle unload frequency.
Motivation
For current uniform load shedder, it will unload 50% of
(max throughput - min throughput)
or (max message rate - min message rate). If the max throughput is 500MB/s, and the min throughput is 0MB/s, it will unload 250MB/s throughput at a time, which will lead the broker into high load for unloading a lot of bundles and cause the broker unstable.Another problem is that the current implementation has no min unload threshold limit. For example, if the max broker throughput is 1MB/s and the min broker throughput is 0MB/s, it will unload 0.5MB/s throughput from the max throughput broker, which is unnecessary and will cause bundle frequently unload.
Modification
MIN_UNLOAD_MESSAGE=1000
andMIN_UNLOAD_THROUGHPUT=1 * MB
, which will skip the low throughput bundle unload and decrease the bundle unload frequency.Documentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)