Stop mount namespace leaks from slowing down your host
Container Basics On Linux (Namespaces/Cgroups)
Stop mount namespace leaks from slowing down your host
🧩 The Challenge
You ever notice your system getting sluggish when running heavy CI pipelines or dozens of short-lived containers? Sometimes the host mount table gets absolutely trashed with stale binds that never got cleaned up, making `ls` and `mount` take forever to run.
💡 The Fix
Check if you have private mount propagation settings that are effectively pinning mount points long after the containers that created them have died. Making sure your mounts are marked as private helps keep the host table sane.
mount --make-rprivate /
grep -E 'shared|slave' /proc/self/mountinfo
⚙️ Why It Works
Setting the mount propagation to private prevents sub-mounts from propagating back to the host, which is usually the culprit when you see thousands of orphaned entries cluttering up your mountinfo file.
🚀 Pro-Tip: Run that grep command periodically in your monitoring scripts to catch runaway propagation before your shell starts hanging on simple file operations.
Linux Tips & Tricks | © ngelinux.com | 10/12/2026
