heesung-sn commented on code in PR #17598:
URL: https://github.com/apache/pulsar/pull/17598#discussion_r969050855


##########
pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/LocalBrokerData.java:
##########
@@ -235,7 +235,16 @@ private void updateBundleData(final Map<String, 
NamespaceBundleStats> bundleStat
     }
 
     public double getMaxResourceUsage() {
-        return max(cpu.percentUsage(), memory.percentUsage(), 
directMemory.percentUsage(), bandwidthIn.percentUsage(),
+        return getMaxResourceUsage(true);
+    }
+
+    public double getMaxResourceUsage(boolean checkMemoryUsage) {
+        if (checkMemoryUsage) {

Review Comment:
   Updated.
   
   I initially thought this checkMemoryUsage config is safer since it does keep 
the old behavior(checking memory).
   
   I see that memory usage is always noisy, so I agree that we could remove it 
from `getMaxResourceUsage`.
   
   Note that we keep `getMaxResourceUsageWithWeightWithinLimit()` as-is -- we 
are not removing the memory usage signal in this func, as its memory usage can 
be already disabled by  `loadBalancerMemoryResourceWeight=0.0`.



-- 
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]

Reply via email to