Site icon New Generation Enterprise Linux

Stop letting slow disk I/O stall your entire system

Performance Tuning & Kernel Parameters (Sysctl)

Stop letting slow disk I/O stall your entire system

🧩 The Challenge

You know that feeling when your web server randomly hangs for ten seconds just because a backup job started writing to the disk? It’s infuriating, and half the time it’s because the kernel is trying to flush too much dirty memory at once.

💡 The Fix

Lower the dirty background ratio so the kernel starts trickling those writes out earlier, which keeps the system responsive instead of hitting a massive I/O wall.

sysctl -w vm.dirty_background_ratio=5
sysctl -w vm.dirty_ratio=10

⚙️ Why It Works

By telling the kernel to start cleaning pages once they occupy 5 percent of memory instead of the default, you prevent a massive backlog that chokes your applications.

🚀 Pro-Tip: Check your current values first with sysctl -a | grep dirty so you have a baseline before you start tweaking.

Linux Tips & Tricks | © ngelinux.com | 10/2/2026

0 0 votes
Article Rating
Exit mobile version