thetumbled opened a new pull request, #17820:
URL: https://github.com/apache/pulsar/pull/17820
<!-- Either this PR fixes an issue, -->
Fixes #<17815> incorrect CPU usage collected by pulsar
### Motivation
cpu usage reported by pulsar is greater than 100%,needed to be fixed.
### Modifications
org.apache.pulsar.broker.loadbalance.LinuxInfoUtils#getTotalCpuLimit
if CGROUP is enabled and quota is -1, we utilize the content of
/sys/fs/cgroup/cpu/cpuacct.usage_percpu to get the correct number of CPUs in
the system.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe
tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads
(10MB)*
- *Extended integration test for recovery after broker failure*
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc-required`
(Your PR needs to update docs and you will update later)
- [ x ] `doc-not-needed`
- [ ] `doc`
(Your PR contains doc changes)
- [ ] `doc-complete`
(Docs have been already added)
--
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]