-
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
[improve] [broker] disable balancing based on DirectMemory. #21168
[improve] [broker] disable balancing based on DirectMemory. #21168
Conversation
Could you help to review this PR? thanks. @heesung-sn @Demogorgon314 |
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.
+1
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
Can we keep this direct memory signal but the default |
It is weird that we remove momory signal but retain direct memory signal, right? |
IMO, these removals need to be agreed by the community. I don't know if any users rely on these memory and direct memory signals in their production. This seems to be a radical decision. |
It does. My original idea is to set the default value of |
def7d37
to
4fe420b
Compare
I think we can change the default value to |
/pulsarbot rerun-failure-checks |
There's a related enhancement proposal in #21973 , please take a look. |
…, LeastLongTermMessageRate, ModularLoadManagerImpl. (#22889) Implementation PR: #22888 ### Motivation Initially, we introduce `loadBalancerCPUResourceWeight`, `loadBalancerBandwidthInResourceWeight`, `loadBalancerBandwidthOutResourceWeight`, `loadBalancerMemoryResourceWeight`, `loadBalancerDirectMemoryResourceWeight` in `ThresholdShedder` to control the resource weight for different resources when calculating the load of the broker. Then we let it work for `LeastResourceUsageWithWeight` for better bundle placement policy. But #19559 and #21168 have point out that the actual load of the broker is not related to the memory usage and direct memory usage, thus we have changed the default value of `loadBalancerMemoryResourceWeight`, `loadBalancerDirectMemoryResourceWeight` to 0.0. There are still some places where memory usage and direct memory usage are used to calculate the load of the broker, such as `OverloadShedder`, `LeastLongTermMessageRate`, `ModularLoadManagerImpl`. We should let the resource weight work for these places so that we can set the resource weight to 0.0 to avoid the impact of memory usage and direct memory usage on the load of the broker. ### Modifications - Let resource weight work for `OverloadShedder`, `LeastLongTermMessageRate`, `ModularLoadManagerImpl`.
Motivation
As shown in the following figure, the throughput in/out, message in/out, bandwidht in/out usage and CPU usage go up and down periodically as time goes by, while the memory usage and direct memory usage has nothing to do with the actual load.
Using memory usage and direct memory usage to score the broker load will result into wrong result.
Modifications
Removing memory usage and direct memory usage for scoring.As PR#19559 has removed memory usage, i will remove direct memory usage for scoring.
Change the default value of
loadBalancerDirectMemoryResourceWeight
.Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: thetumbled#30