What is cgroups v2? and how it affects our application
summary
Kubernetes 1.25 clusters on Ubuntu 2022 default to cgroups v2, which changes cgroup paths and breaks older runtimes’ resource accounting; one customer’s memory bill doubles as a cluster grows from 17 to 35 nodes. Older Java runtimes consume far more memory (examples show a service dropping from ~418 MB to ~44 MB after moving to JDK 17). Short-term mitigations include setting cgroup_unified=0 and rebooting or deploying a DaemonSet to adjust node config, but the reliable fix is upgrading runtimes.
AI-written summary · about
chapters (13)
- 0:00Introduction to cgroups
- 1:27Resource allocation in Kubernetes
- 6:46Why resource management matters
- 8:54cgroups v2 significance
- 13:13History of cgroups v1 vs v2
- 15:21cgroups v1 vs v2 differences
- 17:28Java app compatibility with v2
- 20:37Mitigating issues without source code upgrades
- 23:07Debugging memory spikes
- 26:17Recommendations for future-proofing
- 28:04Reverting to cgroups v1
- 29:54App compatibility responsibility
- 30:20Q&A: OOM killer
related talks
29mCgroups V2: Before You Jump In
46mCgroupv2 Is Coming Soon To a Cluster Near You
35mFuture-Proof Your Applications: Avoid Breakdowns With Cgroup Chan...
38mUnderstanding and Working with the Cgroups Interface
45mLinux Kernel Control Group v2
47mCPU & Memory, Requests & Limits, QoS & CFS: The JVM in the Kubernetes Pod
57mAn introduction to control groups (cgroups) version 2
34mCgroups and Enterprise Users
