logo

Cgroupv2 Is Coming Soon To a Cluster Near You

2022-10-28

Authors:   David Porter, Mrunal Patel


Summary

The presentation discusses the implementation and benefits of Cgroup V2 in Kubernetes.
  • Cgroup V2 is a new version of the control group subsystem in the Linux kernel that provides better resource management and control.
  • Kubernetes has integrated Cgroup V2 to improve node stability and resource management.
  • The presentation highlights the benefits of Cgroup V2, including improved memory usage, PSI pressure metrics, disk throttling, and UMD.
  • Users should test their applications for compatibility with Cgroup V2 and work with vendors to ensure compatibility.
  • Popular projects like C advisor and Auto Max Crocs have been upgraded to support Cgroup V2.
  • Java applications should upgrade to versions 11.0.16 and 15+ to ensure compatibility with Cgroup V2.
The presenter demonstrates the deployment of a simple workload on a Kubernetes cluster with Cgroup V2 enabled and shows how the Kublet pod secret hierarchy is set up.

Abstract

K8S 1.25 will aim to default cgroupv2 KEP to GA and many new linux distros are already defaulting to cgroupv2 such as latest versions of Ubuntu, Debian, RHEL, etc. This talk will focus on what is cgroupv2 (new kernel APIs for resource management), what cluster administrations need to be aware of during this transition to cgroupv2, and what new features cgroupv2 in k8s will unlock. Some examples of areas we will cover will be memory throttling, disk latency targets, and pressure monitoring. We will discuss some of the active KEPS in k8s taking advantage of these new capabilities and future work in this space. cgroups underlie how resource management works in k8s and focuses on how to properly reserve, allocate, and isolate finite resources on nodes such as CPU, memory, disk, network, etc. This talk will cover the present and future of resource management in k8s. Starting from use cases, we will look under the hood at how kubelet utilizes the underlying linux kernel cgroups for resource isolation and what will change with cgroupv2. There is widespread confusion in the community - should CPU limits be used or not or do they introduce unintended throttling? We hope to provide clarity around this topic and how cgroupv2 will affect it. We will also look at future work in this area.

Materials:

Post a comment

Related work

Authors: Alexander Kanevskiy, Swati Sehgal, David Porter, Sascha Grunert, Evan Lezar
2023-04-19



Authors: Alexander Kanevskiy, Krisztian Litkey