heesung-sn commented on code in PR #17598:
URL: https://github.com/apache/pulsar/pull/17598#discussion_r970151813
##########
pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/LocalBrokerData.java:
##########
@@ -235,7 +235,8 @@ private void updateBundleData(final Map<String,
NamespaceBundleStats> bundleStat
}
public double getMaxResourceUsage() {
- return max(cpu.percentUsage(), memory.percentUsage(),
directMemory.percentUsage(), bandwidthIn.percentUsage(),
+ // does not consider memory because it is noisy by gc.
+ return max(cpu.percentUsage(), directMemory.percentUsage(),
bandwidthIn.percentUsage(),
Review Comment:
updated.
##########
conf/broker.conf:
##########
@@ -1163,6 +1163,9 @@ loadBalancerEnabled=true
# Percentage of change to trigger load report update
loadBalancerReportUpdateThresholdPercentage=10
+# minimum interval to update load report
+loadBalancerReportUpdateMinIntervalMilliSeconds=5000
Review Comment:
updated.
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2087,6 +2087,14 @@ public class ServiceConfiguration implements
PulsarConfiguration {
category = CATEGORY_LOAD_BALANCER,
doc = "maximum interval to update load report"
)
+
+ private int loadBalancerReportUpdateMinIntervalMilliSeconds = 5000;
+ @FieldContext(
+ category = CATEGORY_LOAD_BALANCER,
+ dynamic = true,
+ doc = "Min delay of load report to collect, in milli-seconds"
+ )
Review Comment:
updated.
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2087,6 +2087,14 @@ public class ServiceConfiguration implements
PulsarConfiguration {
category = CATEGORY_LOAD_BALANCER,
doc = "maximum interval to update load report"
)
+
+ private int loadBalancerReportUpdateMinIntervalMilliSeconds = 5000;
+ @FieldContext(
+ category = CATEGORY_LOAD_BALANCER,
+ dynamic = true,
+ doc = "Min delay of load report to collect, in milli-seconds"
+ )
Review Comment:
updated.
##########
pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/LocalBrokerData.java:
##########
@@ -235,7 +235,8 @@ private void updateBundleData(final Map<String,
NamespaceBundleStats> bundleStat
}
public double getMaxResourceUsage() {
- return max(cpu.percentUsage(), memory.percentUsage(),
directMemory.percentUsage(), bandwidthIn.percentUsage(),
+ // does not consider memory because it is noisy by gc.
+ return max(cpu.percentUsage(), directMemory.percentUsage(),
bandwidthIn.percentUsage(),
Review Comment:
updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]