This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new b10eed6455d [improve] [broker] disable balancing based on 
DirectMemory. (#21168)
b10eed6455d is described below

commit b10eed6455dd5b945d938e05b45ee4cfd635cd87
Author: thetumbled <[email protected]>
AuthorDate: Thu Sep 14 10:44:06 2023 +0800

    [improve] [broker] disable balancing based on DirectMemory. (#21168)
---
 conf/broker.conf                                                     | 4 +++-
 .../src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/conf/broker.conf b/conf/broker.conf
index 40eb1bcc324..4ad8536fd8d 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -1372,7 +1372,9 @@ loadBalancerCPUResourceWeight=1.0
 
 # The direct memory usage weight when calculating new resource usage.
 # It only takes effect in the ThresholdShedder strategy.
-loadBalancerDirectMemoryResourceWeight=1.0
+# Direct memory usage cannot accurately reflect the machine's load,
+# and it is not recommended to use it to score the machine's load.
+loadBalancerDirectMemoryResourceWeight=0
 
 # Bundle unload minimum throughput threshold (MB), avoiding bundle unload 
frequently.
 # It only takes effect in the ThresholdShedder strategy.
diff --git 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index 25b6ac75e0e..c93b6832550 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -2419,9 +2419,10 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
     @FieldContext(
             dynamic = true,
             category = CATEGORY_LOAD_BALANCER,
-            doc = "Direct Memory Resource Usage Weight"
+            doc = "Direct Memory Resource Usage Weight. Direct memory usage 
cannot accurately reflect the "
+                    + "machine's load, and it is not recommended to use it to 
score the machine's load."
     )
-    private double loadBalancerDirectMemoryResourceWeight = 1.0;
+    private double loadBalancerDirectMemoryResourceWeight = 0;
 
     @FieldContext(
             dynamic = true,

Reply via email to