The Shift to cgroup v2 in Kubernetes & OpenShift: Deprecation of cgroup v1, Memory QoS, and Systems Impact
Briefing Summary
In the enterprise cloud-native and Linux systems landscape, kernel-level resource control forms the foundation of container orchestration. For more than a decade, cgroup v1 (control groups v1) served as the operational backbone for Docker, containerd, CRI-O, and Kubernetes. However, its architectural flaws — notably the orthogonal, independent hierarchy of individual resource controllers (CPU, memory, blkio, pids) — introduced persistent operational anomalies, writeback deadlocks, and an inability to accurately quantify resource contention.
The official Kubernetes Blog recently published an essential roadmap update (“The Shift to cgroup v2 in Kubernetes: What You Need to Know”), establishing an irrevocable milestone: cgroup v1 support entered strict maintenance mode in Kubernetes 1.31 and is officially deprecated in Kubernetes 1.35, where the kubelet flag failCgroupV1 will default to true, blocking kubelet initialization on any legacy cgroup v1 host.
For platform engineers (AS200) and AI infrastructure architects (AS300), this transition is far more than a routine dependency bump: it fundamentally reshapes node resilience, OOM handling, and real-time systems observability.
1. Architectural Shift: Unified Tree vs Orthogonal Hierarchies
Under cgroup v1, each subsystem operated within its own distinct pseudo-filesystem hierarchy beneath /sys/fs/cgroup/<controller>/. A single process could belong to /sys/fs/cgroup/memory/groupA while simultaneously running in /sys/fs/cgroup/cpu/groupB.
This design created intractable challenges inside the Linux kernel:
- Page Cache & Buffered I/O Writeback : When an application wrote to disk, dirty pages were charged to the process’s memory cgroup. However, asynchronous background writeback operations were performed by kernel worker threads (
kworker) residing in the root blkio cgroup. Consequently, the I/O controller was blind to the true origin of disk traffic, rendering I/O throttling completely ineffective. - cgroup v2 (Unified Hierarchy) : cgroup v2 organizes all active controllers into a single unified filesystem tree rooted at
/sys/fs/cgroup/. A process belongs to exactly one cgroup, and controllers are dynamically enabled down the tree via thecgroup.subtree_controlinterface.
On any Linux or Red Hat Enterprise Linux (RHEL 9 / RHEL 10) host running OpenShift or Kubernetes, the active cgroup version is verified deterministically:
stat -fc %T /sys/fs/cgroup/
# Expected cgroup v2 output: cgroup2fs (tmpfs denotes legacy cgroup v1)
2. Memory QoS: Moving from Brutal OOM Kills to Graceful Throttle & Reclaim
Under cgroup v1, memory management was rigid and binary: administrators defined a hard ceiling (memory.limit_in_bytes). Once a container exceeded this threshold and cached memory could not be reclaimed, the kernel OOM Killer was immediately invoked, dispatching an ungraceful SIGKILL.
cgroup v2 introduces multi-tiered Memory QoS primitives:
memory.min: Hard-guaranteed memory protection. Memory under this boundary is never reclaimed by the kernel under any circumstance, providing bulletproof allocations for host daemons and mission-critical ServingRuntimes.memory.low: Soft-guaranteed memory protection. Reclaimed only as a measure of last resort during extreme system-wide pressure.memory.high: Smooth memory throttling boundary. When container usage exceedsmemory.high, processes are not terminated: the kernel proactively throttles allocation rates and aggressively reclaims page cache. The workload experiences graceful performance degradation rather than catastrophic failure.memory.max: Absolute ceiling equivalent to the legacy v1 hard limit, triggering the OOM Killer only if reclamation beneathmemory.highproves insufficient.
3. PSI (Pressure Stall Information): Detecting Resource Starvation Before Outages
A cornerstone breakthrough enabled by cgroup v2 is the native integration of PSI (Pressure Stall Information).
While standard resource metrics (CPU load percentage, resident memory) convey raw capacity, they cannot determine whether a workload is experiencing performance degradation. PSI quantifies the exact share of wall-clock time that tasks spend stalled waiting for scarce hardware resources:
cpu.pressure: Delays incurred when runnable threads compete for CPU cores.memory.pressure: Delays spent waiting for page allocation, cache reclaim, or swap.io.pressure: Latency stalls blocked on storage subsystems (CSI drivers, NVMe drives).
In Kubernetes, PSI metrics are exposed by the kubelet and scraped directly into Prometheus. Platform and DevOps teams can leverage these indicators to drive proactive autoscaling (KEDA) and closed-loop automated remediation (Event-Driven Ansible), reacting to starvation long before containers suffer eviction or crash loops.
4. In-Place Pod Resource Resizing (KEP 1287)
Another major capability unlocked in modern production clusters is In-Place Pod Resource Resizing (KEP 1287 / resizePolicy).
Historically, modifying CPU or memory requests/limits required deleting and recreating the Pod. Leveraging cgroup v2’s unified model and atomic controller updates in CRI-O and the kernel, the kubelet can now dynamically adjust runtime limits (cpu.max, memory.high, memory.max) without restarting the container, preventing downtime for stateful databases and long-running AI model instances.
5. Curriculum Synergies at Aperta Scientia
AS200 — DevOps Platform Engineer (399h)
- RHEL & CRI-O Administration (DO188 / DO288) : Managing system cgroups with
systemd, enforcingcgroup_manager = "systemd"across CRI-O, and isolating system vs workload slices (system.slice,kubepods.slice). - OpenShift Node Tuning & MachineConfig (DO380) : Deploying declarative configurations via the Machine Config Operator (MCO) to audit kubelet flags (
failCgroupV1,MemoryQoS) across RHCOS nodes. - Rootless & Non-Root Container Security : Capitalizing on cgroup v2 to allow non-privileged users to manage resource boundaries, complementing SCC and Linux ambient capabilities.
AS300 — AI Platform Engineer (399h)
- ServingRuntime Memory Resilience (vLLM / KServe) : High-throughput LLMs allocate substantial host memory for weights and CPU KV-cache buffers. Tuning
memory.highandmemory.minprevents unexpected OOM terminations during peak inference spikes. - Hardware Contention Monitoring : Correlating PSI metrics with GPU telemetry (NVIDIA DCGM) to identify PCIe and host RAM bottlenecks during distributed prefill and decoding phases.
6. Technical Sources & Official Documentation
- Kubernetes Official Blog : The Shift to cgroup v2 in Kubernetes: What You Need to Know (October 2026)
- Kubernetes Architecture Guide : About cgroup v2 and Resource Management
- Linux Kernel Documentation : Control Group v2 Official Specification
- Red Hat Enterprise Linux & OpenShift : Configuring cgroups on RHEL and OpenShift Container Platform
Apply these technologies in production
Explore our intensive 3-month AS200 (DevOps) and AS300 (AI Platform Engineer) curriculums.