System Rule highestCpuUsage definition
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
Type: bug report / question / feature
### Describe what happened
The `highestCpuUsage` System Rule has a confusing behavior.
In 1.7.1 `highestCpuUsage` meant [system cpu usage](https://github.com/alibaba/Sentinel/blob/1.7.1/sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/system/SystemStatusListener.java#L57), now [the max between process and system cpu usage](https://github.com/alibaba/Sentinel/blob/master/sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/system/SystemStatusListener.java#L65), which can be confusing.
### Describe what you expected to happen
Due to the [fix done in the jdk](https://bugs.openjdk.java.net/browse/JDK-8226575), maybe Sentinel's custom code could be reverted and/or differentiate process and system cpu usage as separate rules
### How to reproduce it (as minimally and precisely as possible)
A k8s deployment with some cpu-limit, and a java process being stressed.
### Tell us your environment
Sentinel 1.8.0
Kubernetes, multi core server
### Anything else we need to know?
Contributor guide
Research direction
Start with sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/system/SystemStatusListener.java and compare the 1.7.1 and current implementations linked in the issue. Clarify whether highestCpuUsage should use system CPU, process CPU, or separate rules, then verify that the selected behavior is documented and covered by appropriate system-rule tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kubernetes
- Domain
- backend, observability-sre
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100