You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "thetumbled (via GitHub)" <gi...@apache.org> on 2023/02/28 07:00:25 UTC

[GitHub] [pulsar] thetumbled commented on a diff in pull request #19110: [fix] [broker] consider iowait as idle.

thetumbled commented on code in PR #19110:
URL: https://github.com/apache/pulsar/pull/19110#discussion_r1119643823


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java:
##########
@@ -132,7 +133,7 @@ public static ResourceUsage getCpuUsageForEntireHost() {
                     .filter(s -> !s.contains("cpu"))
                     .mapToLong(Long::parseLong)
                     .sum();
-            long idle = Long.parseLong(words[4]);
+            long idle = Long.parseLong(words[4]) + Long.parseLong(words[5]);

Review Comment:
   The current implementation of module is splitting values directly.
   ```
   long idle = Long.parseLong(words[4]);
   ```
   there is no different with the patch.
   ```
   long idle = Long.parseLong(words[4]) + Long.parseLong(words[5]);
   ```
   I think we could fix this problem with this patch first. 
   WDYT. @codelipenghui 



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org