Stop your server from ignoring half your RAM during disk I/O
Performance Tuning & Kernel Parameters (Sysctl)
Stop your server from ignoring half your RAM during disk I/O
🧩 The Challenge
Dealing with a server that suddenly grinds to a halt while performing heavy backups is maddening, especially when top shows you have plenty of free RAM. It turns out the kernel is busy flushing dirty pages to disk like its life depends on it, and it locks up the whole system while doing so.
💡 The Fix
You need to tune the dirty writeback ratios so the kernel spreads that disk I/O load out instead of letting it build up into a massive, blocking spike. Just tweak these two sysctl values to make your system much more responsive under heavy load.
sysctl -w vm.dirty_background_ratio=5
sysctl -w vm.dirty_ratio=10
⚙️ Why It Works
Setting these lower forces the kernel to start writing dirty pages to disk much earlier rather than waiting until the last possible second. By the time the system is under actual pressure, the I/O queue is already managed rather than exploding all at once.
🚀 Pro-Tip: Add these to /etc/sysctl.conf so they actually stick after a reboot.
Linux Tips & Tricks | © ngelinux.com | 9/19/2026
