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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java:
##########
@@ -85,6 +86,8 @@ public static double getTotalCpuLimit(boolean 
isCGroupsEnabled) {
                 if (quota > 0) {
                     return 100.0 * quota / period;
                 }
+                int cpuCount = 
readTrimStringFromFile(Paths.get(CGROUPS_CPU_USAGE_PER_CPU_PATH)).split(" 
").length;

Review Comment:
   I am not expert in CGROUP, but it seems that cpuset.cpus would be a good 
choice. cpuset.cpus is a mandatory parameter in cpuset subsystem, and 
cpuset.cpus.effective is not mandatory.
   for example, i do not find cpuset.cpus.effective in my system,but 
cpuset.effective_cpus.
   
   ```
   cpuset.cpus (mandatory)
   specifies the CPUs that tasks in this cgroup are permitted to access. This 
is a comma-separated list, with dashes ("-") to represent ranges. For example,
   0-2,16
   represents CPUs 0, 1, 2, and 16.
   ```
   
   



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