heesung-sn commented on code in PR #17820:
URL: https://github.com/apache/pulsar/pull/17820#discussion_r980387294
##########
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:
Could you provide some references regarding this change?
Though this appears to be a good way to estimate the number of cpus, I
wonder if this is the "correct" way to get the max number of CPUs per cgroup.
--
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]