Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better recommendation about JDK and cgroups #3717

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions examples/cgroups/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Revert Kubernetes 1.25 to cgroup v1

JDK 10 introduced ```UseContainerSupport``` which provided support for running Java applications within containers.
As cgroup v2 is GA in 1.25+, and is also the default on Ubuntu 22.04, customers may have to downgrade to cgroups v1 due to compatibility issues with older software.

The Java runtime will use the cgroup filesystem to understand the memory and cpu availability.
To perform a cgroups version downgrade on your nodes, use this [Daemonset](./revert-cgroup-v1.yaml).

With the introduction of cgroup v2, the location of these files has changed and Java applications prior to JDK 15 will exhibit significant memory consumption which may make your environments unstable.
## Important note

As cgroup v2 is GA in 1.25, and is also the default on Ubuntu 22.04, customers should migrate their applications to JDK 15+.
The Daemonset by default will apply to all nodes in your cluster and will reboot them to apply the cgroup change. Please set a nodeSelector to control how this gets applied.

An alternative temporary solution is to revert the cgroup version on your nodes using this [Daemonset](./revert-cgroup-v1.yaml).
## Java related issues

If you observe memory issues with Java-based systems and products, you may have to update your JDK installation to a newer minor version that supports cgroups v2.

* JDK 8: 1.8.0_372 or later
* JDK 11: 11.0.18 or later

## IMPORTANT NOTE

The Daemonset by default will apply to all nodes in your cluster and will reboot them to apply the cgroup change. Please set a nodeSelector to control how this gets applied.
If updating the JDK is not an option, an alternative is by downgrading to cgroups v1.