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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to