Diving deeper into control groups (cgroups) v2
summary
Demonstrates three concrete cgroup v2 features with live demos: release notification by monitoring cgroup.events (watching the populated key via inotify or poll/epoll) to detect when a subtree becomes empty; delegation by chowning the cgroup directory and specific files (cgroup.procs, cgroup.subtree_control) guided by /sys/kernel/cgroup/delegate and enforcing containment rules that require write on the target procs and the common-ancestor procs; and thread mode by creating threaded subtrees (cgroup.type = threaded) and moving individual threads via cgroup.threads to impose per-thread cpu.max limits — the examples run and show expected behavior.
AI-written summary · about
chapters (14)
- 0:00Start
- 0:58Release Notification
- 1:26Cgroup Release Notification
- 14:24Resource Controller Interface
- 14:55The Delegation Step
- 16:34The Delegation Containment Rules
- 30:30Thread Mode
- 31:40The Memory Controller
- 34:38Threaded Subtrees
- 37:45Cgroup Threads
- 38:03Cgroup Type
- 39:00Domain Invalid
- 44:13Create a Threaded Subtree
- 55:47Implicit Transitions
related talks
45mLinux Kernel Control Group v2
38mUnderstanding and Working with the Cgroups Interface
35mFuture-Proof Your Applications: Avoid Breakdowns With Cgroup Chan...
34mCgroups and Enterprise Users
27msystemd cgroup delegation and control processes
27mPostgreSQL container groups, aka cgroups down the road
42mcgroup2 Resource Control strategies w/ resctl-demo
32mWhat is cgroups v2? and how it affects our application
