A CORPOLEARN SPECIALIST SCHOOL

Preparing systems and incident trade-offs

~/posts/post_name ?? ‘article’); ?>.md
STATUS: PUBLISHED

Deep Dive into Linux Kernel Memory Management and Cgroups v2

apiVersion: platformops.school/v1
kind: TechnicalGuide
metadata:
published:
readingTime:

1 min read

Linux Kernel Virtual Memory & Cgroups v2

Understanding how the Linux kernel allocates physical pages via the Buddy Allocator and handles memory pressure with the Out-Of-Memory (OOM) killer is crucial for Kubernetes node stability.

Cgroups v1 vs v2 Unified Hierarchy

In cgroups v2, process management uses a unified tree structure located at /sys/fs/cgroup. Unlike v1, controller limits are configured via high, min, and low memory thresholds:

# Inspect unified cgroup memory metrics
$ cat /sys/fs/cgroup/memory.current
$ cat /sys/fs/cgroup/memory.high
$ cat /sys/fs/cgroup/memory.max