Stop guessing why your cgroup limits aren’t kicking in
Container Basics On Linux (Namespaces/Cgroups)
Stop guessing why your cgroup limits aren’t kicking in
🧩 The Challenge
Dealing with a container that keeps eating all your RAM despite having a limit set is a total nightmare. I spent three hours last week realizing the kernel wasn’t even looking at the hierarchy I thought I was configuring.
💡 The Fix
Use systemd-cgtop to see exactly how your processes are actually grouped in the cgroup tree. It saves you from debugging ghost limits that don’t apply to the PID you’re staring at.
systemd-cgtop
⚙️ Why It Works
This utility pulls real-time stats directly from the cgroup filesystem, showing you the CPU, memory, and I/O usage for every controller. It cuts through the noise of ps and top by grouping things the same way the kernel sees them.
🚀 Pro-Tip: Hit ‘k’ inside the tool to sort by kernel memory usage if you’re hunting down a memory leak.
Linux Tips & Tricks | © ngelinux.com | 7/14/2026
