Platform Engineering · Lesson 12

cgroups Internals and Resource Controls

Stage 1 · Linux Mastery · Advanced

Inspect cgroups v1 and v2, controllers, delegation, PSI, systemd, Docker, and Kubernetes resource behavior.

Reading time · ~40 minutes, interactive

Difficulty: Advanced · Know this first: the preceding lesson in this module

Production request

Use this incident as the thread: a team needs a reliable answer, but one resource or control is behaving differently under load.

What is happening?

What can fail?

How do I troubleshoot it?

Change an input

Adjust the working-set or load assumption and keep the diagnosis explicit.

50

Commands and parameters

Run the commands in a disposable lab or on a host you own. Replace placeholders such as $PID and $POD.

stat -fc %T /sys/fs/cgroup
find /sys/fs/cgroup -maxdepth 2 -type f | head
cat /sys/fs/cgroup/cgroup.controllers
cat /sys/fs/cgroup/cpu.stat
cat /proc/pressure/cpu

Knowledge check

Hands-on lab

Write what you observed, the command or query you ran, and the next decision you would make.

Lab is ready.

Basic to master checks

Basic

Intermediate

Advanced

Master

Production design exercise

Design the control for a multi-tenant production platform. State the boundary, signal, safe default, failure mode, rollback, and owner.

Next in this series · Lesson 13
Linux Performance Profiling: perf, Flame Graphs, and Off-CPU Time

When a request is slow, its time went somewhere: running on a CPU, waiting for a CPU, inside a system call, faulting in memory, or asleep waiting for a disk or a lock. Profiling is finding out which.

Go to Lesson 13 →

Or browse the full course from the Lessons index.