Closed lgrateau closed 1 year ago
Some additional tests on different types of VM; RHEL 7 runs with cgroup (Podman 1.6.4) and RHEL 8 runs with cgroupv2 (Podman 3.3.1). I instanciated VMs with 2 and 8 GB but always ran the same command (podman run -m 4g --rm
RHEL 7 2GB | RHEL 7 8GB | RHEL 8 2GB | RHEL 8 8GB | |
---|---|---|---|---|
ibmjava:8-jre | 512.00M | 3.00G | 512.00M | 512.00M |
store/oracle/serverjre:8 | 910.50M | 910.50M | 405.50M | 1.69G |
openjdk:8-jre | 910.50M | 910.50M | 405.50M | 1.69G |
The most problematic result is of course Max Heap Size = 512MB in cgroupv2, even in the case of a fat VM :( OOME are raised fast with our product using IBM Java.
If this issue connect with: https://github.com/docker/for-mac/issues/6118 ?
The /sys/fs/cgroup/memory/memory.limit_in_bytes
is missing at the new version of Mac docker container, while eclipse ORM project (which J9 JVM depends on) read this file to know if it's running at the container environment, code ref: https://github.com/eclipse/omr/blob/b5643d019207e22e3a6bcb49d09069200289b639/port/unix/omrsysinfo.c#L5941-L5945
@lgrateau , Hi Laurent, I found open JDK has the same issue, the test result is not same with yours:
docker run -m 4GB --rm openjdk:8-jre java -XshowSettings:vm -version
Unable to find image ‘openjdk:8-jre’ locally
8-jre: Pulling from library/openjdk
0e29546d541c: Pull complete
9b829c73b52b: Pull complete
cb5b7ae36172: Pull complete
99ce012bef04: Pull complete
22dc2a72d098: Pull complete
9c69a57e10d9: Pull complete
Digest: sha256:c0ab1c0631266ef9420a414726a790733a2561efc5f4fa2f9b8186f4d6b00d53
Status: Downloaded newer image for openjdk:8-jre
VM settings:
Max. Heap Size (Estimated): 665.00M
Ergonomics Machine Class: server
Using VM: OpenJDK 64-Bit Server VM
openjdk version “1.8.0_312”
OpenJDK Runtime Environment (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
Thanks for the feeback we will follow the docker issue too.
seem fixed closing it.
With:
The computation of the memory of the JVM is not correct and cause Out Of Memory:
This is not the case with openjdk :
The root cause is probably due to the CGroup V2 support.
If we force use of cgroup v1 in Docker Desktop (with dev build listed on https://github.com/docker/for-mac/issues/6073#issuecomment-993274406) it works again fine: