[RFC] Backport cgroups v2 support to 11u?
Langer, Christoph
christoph.langer at sap.com
Fri Feb 25 12:15:42 UTC 2022
Hi Severin,
as this falls under the category "enabling new computing environments" and the changes seem to be more on the outskirts of the core JVM I would be positive about this effort.
Best regards
Christoph
> -----Original Message-----
> From: jdk-updates-dev <jdk-updates-dev-retn at openjdk.java.net> On
> Behalf Of Severin Gehwolf
> Sent: Freitag, 25. Februar 2022 11:15
> To: jdk-updates-dev at openjdk.java.net
> Subject: [RFC] Backport cgroups v2 support to 11u?
>
> Hi,
>
> We, Red Hat, think that getting cgroups v2 support backported to JDK 11u
> (and perhaps 8u) would be good at this point since systems which use
> cgroups v2 by default become more an more widely used. For example Red
> Hat Enterprise Linux 9[1] will have that turned on by default.
> Recent Fedora and Ubuntu distributions have it on by default.
> Similarly, container technology such as Docker and Kubernetes support
> cgroups v2 as well.
>
> The risk of NOT backporting those patches is that the JVM would wrongly
> detect resource limits. Even though, -XX:+UseContainerSupport is on by
> default in 11u, container detection code would just give up early and would
> use the host systems' resource limits instead. That gets us back to pre-JDK-
> 8146115[2] behaviour of the JDK when running on such systems. I.e. random
> OOM kills and other strange behaviour. IMHO, that would be bad.
>
> Cgroups v2 support has been available in the JDK since version 15 and up and,
> I believe, most bugs have been shaken out in due course.
> Support code has been pretty stable over the last couple of major JDK
> releases. The code is Linux-only and is pretty self-contained. It is our belief
> that the risks of introducing those patches to 11u is manageable.
>
> We propose to backport the following patch-set from JDK 15+:
>
> Cgroups v2: Container awareness
> https://bugs.openjdk.java.net/browse/JDK-8230305
>
> Cgroups v2: Rework Metrics in java.base so as to recognize unified hierarchy
> https://bugs.openjdk.java.net/browse/JDK-8231111
>
> 8230305 causes slowdebug build failure
> https://bugs.openjdk.java.net/browse/JDK-8237479
>
> [cgroups v2] Soft memory limit incorrectly using memory.high
> https://bugs.openjdk.java.net/browse/JDK-8253714
>
> Cgroups: Incorrect detection logic on old systems in hotspot
> https://bugs.openjdk.java.net/browse/JDK-8239785
>
> Cgroups: Incorrect detection logic on some systems
> https://bugs.openjdk.java.net/browse/JDK-8239559
>
> jtreg test error in
> test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
> https://bugs.openjdk.java.net/browse/JDK-8244500
>
> containers/cgroup/PlainRead.java fails on Ubuntu 21.10
> https://bugs.openjdk.java.net/browse/JDK-8278951
>
> [cgroups v2] Account for the fact that swap accounting is disabled on some
> systems
> https://bugs.openjdk.java.net/browse/JDK-8253797
>
> Cgroups: Incorrect detection logic on some systems (still reproducible)
> https://bugs.openjdk.java.net/browse/JDK-8245543
>
> [Metrics] Enhance parsing of cgroup interface files for version detection
> https://bugs.openjdk.java.net/browse/JDK-8254001
>
> HotSpot Not Identifying it is Running in a Container
> https://bugs.openjdk.java.net/browse/JDK-8252359
>
> Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist
> https://bugs.openjdk.java.net/browse/JDK-8253435
>
> [TESTBUG] Increase coverage of the cgroups detection code
> https://bugs.openjdk.java.net/browse/JDK-8253939
>
> Thoughts? What do other 11u maintainers think?
>
> Thanks,
> Severin
>
> [1]
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
> .redhat.com%2Fen%2Fblog%2Fwhats-new-rhel-90-
> beta&data=04%7C01%7Cchristoph.langer%40sap.com%7Cad88737ed6b
> 7455c130c08d9f847cc82%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7
> C637813809524243235%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sda
> ta=9Rht%2BlwQt4nvq7WeVAWdB6hbK25Uupz57qgprqCDtbc%3D&rese
> rved=0
> [2] https://bugs.openjdk.java.net/browse/JDK-8146115
More information about the jdk-updates-dev
mailing list