thetumbled opened a new issue, #17815:
URL: https://github.com/apache/pulsar/issues/17815

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   pulsar 2.9.3
   linux 4.19.16
   
   ### Minimal reproduce step
   
   1. enable CGROUP
   2. assign 23 CPUs to broker process,while there are 40 CPUs in the system
   ```taskset fffffe0000 bin/***```
   
   
   ### What did you expect to see?
   
   1. cpu usage is smaller than 100%
   
   ### What did you see instead?
   
   1. cpu usage is greater than 100%,and the cpu usage reported by pulsar need 
to be fixed by multiply 23/40.
   2. for example,pulsar could report 150%,but the real cpu usage is 
150*23/40=86.25%
   
   ### Anything else?
   
   this is because Runtime.getRuntime().availableProcessors() method return 23, 
which is the number of processors can be utilized by this process, but what we 
need is 40.
   we could retrieve metadata from ZK, and verify that the limit of cpu is 
2300, not 4000.
   <img width="277" alt="image" 
src="https://user-images.githubusercontent.com/52550727/191927561-98d0db4d-a28c-4441-b261-3b87cadf3df3.png";>
   
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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