container support not enabled due to required cgroup subsystems not found
Baesken, Matthias
matthias.baesken at sap.com
Thu Mar 15 12:55:42 UTC 2018
> Following subsystems are present in the docker container:
> # ls /sys/fs/cgroup/
> blkio cpu cpuacct cpuacct,cpu cpuset devices freezer hugetlb
> memory net_cls net_prio net_prio,net_cls perf_event pids systemd
>
> As far as I understand, JVM is using only memory, cpu and cpuset
> subsystems
Hi, in jdk10
"cpu,cpuacct"
Is checked as well , see
http://hg.openjdk.java.net/jdk/jdk10/file/b09e56145e11/src/hotspot/os/linux/osContainer_linux.cpp
( but unfortunately not cpuacct,cpu ).
This might cause the message :
> [0.001s][debug][os,container] Required cgroup subsystems not found
In jdk11 both "cpu,cpuacct" and "cpuacct,cpu" are checked .
Jdk11 has also a bit better logging , so I think it would tell you what subsystem is not found .
Could you maybe rerun with jdk11 ?
Thanks, Matthias
> -----Original Message-----
> From: jdk-dev [mailto:jdk-dev-bounces at openjdk.java.net] On Behalf Of
> ashutosh mehra
> Sent: Donnerstag, 15. März 2018 11:52
> To: jdk-dev at openjdk.java.net
> Subject: container support not enabled due to required cgroup subsystems
> not found
>
> When I run jdk-10+46 build in a docker container, I don't see MaxHeapSize
> being adjusted based on container memory limit.
>
> Command to run docker container with 2G memory, 2 CPUs:
> $ docker run -m2g --memory-swap=2g --cpus=2 -it --rm -v
> /home/ashu/data/builds/openjdk/jdk-10+46:/root/jdk-10 ubuntu:16.04
>
> Once inside the container ran the following command:
>
> # /root/jdk-10//bin/java -XX:+UnlockDiagnosticVMOptions
> -XX:+PrintFlagsFinal -version | grep MaxHeapSize
>
> Output:
> size_t MaxHeapSize = 2015363072
> {product} {ergonomic}
> openjdk version "10" 2018-03-20
> OpenJDK Runtime Environment 18.3 (build 10+46)
> OpenJDK 64-Bit Server VM 18.3 (build 10+46, mixed mode)
>
> When I used -Xlog:os+container=trace option, I get following information:
>
> # /root/jdk-10//bin/java "-Xlog:os+container=trace" -version
>
> [0.001s][trace][os,container] OSContainer::init: Initializing Container
> Support
> [0.001s][debug][os,container] Required cgroup subsystems not found
> openjdk version "10" 2018-03-20
> OpenJDK Runtime Environment 18.3 (build 10+46)
> OpenJDK 64-Bit Server VM 18.3 (build 10+46, mixed mode)
>
> Following subsystems are present in the docker container:
> # ls /sys/fs/cgroup/
> blkio cpu cpuacct cpuacct,cpu cpuset devices freezer hugetlb
> memory net_cls net_prio net_prio,net_cls perf_event pids systemd
>
> As far as I understand, JVM is using only memory, cpu and cpuset
> subsystems
> which are present in my system. Not sure why is it reporting "Required
> cgroup subsystems not found".
>
> Any idea what could be wrong here? Are there other debug options to figure
> out what is going wrong?
>
> Regards,
> Ashutosh Mehra
More information about the hotspot-dev
mailing list