You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/16 16:13:55 UTC

[GitHub] [pulsar] heesung-sn commented on pull request #16832: [feature][broker] Support cgroup v2 by using `jdk.internal.platform.Metrics` in Pulsar Loadbalancer

heesung-sn commented on PR #16832:
URL: https://github.com/apache/pulsar/pull/16832#issuecomment-1216854483

   
   > @heesung-sn What do you think?
   
   
   
   According to this article, 
   https://developers.redhat.com/articles/2022/04/19/java-17-whats-new-openjdks-container-awareness#recent_changes_in_openjdk_s_container_awareness_code
   
   It seems like `OperatingSystemMXBean` already provides `cpu usage in percentage relative to cgroup (for both v1 and v2)` (I will call it as `cpu_usage_in_percent_cgroup` for our discussion)
   
   I agree with you. From my understanding, load balancer cares about `cpu_usage_in_percent_cgroup` in the end for the cpu usage computation. 
   
   However, LB also requires other signals such as `memory_usage_in_percent_cgroup`, `network_usage_in_percent_cgroup`, which require separate limits for their percentage computation.
   
   As you pointed out, the problem is that LB uses the same generic code (requiring limit) to compute the resource percentage.
   
   Maybe we can tweak the code to ignore the limit and use the signal as-is if they are already in the `*_usage_in_percent_cgroup` form.


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