Some new findings: strace shows that java reads
/sys/fs/cgroup/memory/user.slice/user-0.slice/session-c254.scope/memory.limit_in_bytes
instead of
/sys/fs/cgroup/memory/memory.limit_in_bytes
root@debian10:~# cat
/sys/fs/cgroup/memory/user.slice/user-0.slice/session-c254.scope/memory.limit_in_
Dear Harri,
I don't check it yet, but is -XX:+UseContainerSupport a requirement for this??
>root@c526096eb86e:/# java -XX:MaxRAMPercentage=20.0 -XX:MinRAMPercentage=10.0
>-XX:+PrintFlagsFinal -
>root@debian10:~# java -XX:MaxRAMPercentage=20.0 -XX:MinRAMPercentage=10.0
>-XX:+PrintFlagsFinal
Hi folks,
according to some notes on the net (e.g. [1]) openjdk11 is aware of
the container limits for calculating default heap size and some
other internal parameters. Apparently this works very well for
Docker. Sample:
# docker run -ti --rm --cpus 2 -m 4G debian
root@c526096eb86e:/# apt update