-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
16, 17
-
linux
jdk.CPULoad event reports CPU usage.
If JVM runs in a container which is limited CPU resource (quota, shares, cpu), it is incorrect.
When I ran following program inside a container with `--cpuset-cpu=0,1`, I expected jdk.CPULoad event reports 50%, however it reported 25% because container host has 4 CPUs.
```
public class InfiniteLoop{
public static void main(String[] args){
while(true){
}
}
}
```
jdk.CPULoad event uses the result from `get_cpu_load()` in os_perf_linux.cpp, but it does not consider cgroups.
If JVM runs in a container which is limited CPU resource (quota, shares, cpu), it is incorrect.
When I ran following program inside a container with `--cpuset-cpu=0,1`, I expected jdk.CPULoad event reports 50%, however it reported 25% because container host has 4 CPUs.
```
public class InfiniteLoop{
public static void main(String[] args){
while(true){
}
}
}
```
jdk.CPULoad event uses the result from `get_cpu_load()` in os_perf_linux.cpp, but it does not consider cgroups.
- relates to
-
JDK-8265836 OperatingSystemImpl.getCpuLoad() returns incorrect CPU load inside a container
-
- Resolved
-
- links to
-
Review openjdk/jdk/4299