corretto-8 icon indicating copy to clipboard operation
corretto-8 copied to clipboard

backport of JDK-8230305 to Corretto (8 and 11)

Open pluralistix opened this issue 3 years ago • 6 comments

Is your feature request related to a problem?

We are heavily using e.g. MaxRAMPercentage on our containers, running on Corretto 8 and Corretto 11 on Amazon Linux 2. With the upcoming AL 2022 cgroup v2 will be enabled by default and MaxRAMPercentage will not have an affect anymore.

Describe a solution you would like

Are there any plans to have cgroup v2 beeing supported on https://github.com/corretto/corretto-11/tree/develop/src/java.base/linux/classes/jdk/internal/platform and https://github.com/corretto/corretto-8/tree/develop/src/jdk/src/linux/classes/jdk/internal/platform ?

Describe alternatives you have considered

setting Xmx based on value in /sys/fs/cgroup/memory.max

pluralistix avatar Jan 03 '22 10:01 pluralistix

Hi Christian(@pluralistix),

Thank you for informing of the issue with AL2022 and providing the JBS issue. We need to find out whether JDK-8230305 can be backported to OpenJDK11u. In such a case Corretto 11 will pick it up later.

Regarding Corretto 8, the situation might need more time because JDK-8230305 has dependencies which are not backported to OpenJDK8u as well as to Corretto 8. The risk of backporting those dependencies needs to be assessed.

Thanks, Evgeny

eastig avatar Feb 02 '22 15:02 eastig

for OpenJDK11u https://github.com/openjdk/jdk11u-dev/pull/840

pluralistix avatar Feb 25 '22 09:02 pluralistix

See also https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2022-February/012398.html

jerboaa avatar Mar 04 '22 15:03 jerboaa

These changes have been backported to OpenJDK11 and will be released in Corretto-11 as part of the Q3 updates on July 19th.

lutkerd avatar May 16 '22 19:05 lutkerd

a bit stating the obvious. yet...

 Server Version: 20.10.17
 Cgroup Version: 2
docker run --memory=1G amazonlinux bash -c 'yum install https://yum.corretto.aws/x86_64/Packages/java-11-amazon-corretto-devel-11.0.16.8-1.x86_64.rpm -y -q; grep .* /sys/fs/cgroup/memory/memory.limit_in_bytes /sys/fs/cgroup/memory.max 2>/dev/null; java -XX:MaxRAMPercentage=75.0 -XshowSettings -XX:+PrintFlagsFinal -version 2>&1 | grep -E " MaxHeapSize|Max. Heap Size|UseContainerSupport|Provider"'
/sys/fs/cgroup/memory.max:1073741824
   size_t MaxHeapSize                              = 805306368                                 {product} {ergonomic}
     bool UseContainerSupport                      = true                                      {product} {default}
    Max. Heap Size (Estimated): 742.44M
    Provider: cgroupv2
docker run --memory=1G amazonlinux bash -c 'yum install https://yum.corretto.aws/x86_64/Packages/java-11-amazon-corretto-devel-11.0.15.9-1.x86_64.rpm -y -q; grep .* /sys/fs/cgroup/memory/memory.limit_in_bytes /sys/fs/cgroup/memory.max 2>/dev/null; java -XX:MaxRAMPercentage=75.0 -XshowSettings -XX:+PrintFlagsFinal -version 2>&1 | grep -E " MaxHeapSize|Max. Heap Size|UseContainerSupport|Provider"'
/sys/fs/cgroup/memory.max:1073741824
   size_t MaxHeapSize                              = 25048383488                               {product} {ergonomic}
     bool UseContainerSupport                      = true                                      {product} {default}
    Max. Heap Size (Estimated): 23.33G

So 👍 for 11. Does "anyone" can say anything about 8?

pluralistix avatar Jul 19 '22 20:07 pluralistix

This has already been backported to 11, but 8 is still pending

alvdavi avatar Sep 09 '22 23:09 alvdavi

Still no word on 8?

btsteve avatar May 30 '23 20:05 btsteve

This was backported to Corretto (and openjdk8) as part of 8u372, in 7eb2803b5b3 and 362cf7628b7

benty-amzn avatar May 30 '23 21:05 benty-amzn