Performance Tuning & Kernel Parameters (Sysctl)
Stop your Linux box from dropping packets during a heavy load spike
🧩 The Challenge
Dealing with a web server that suddenly decides to drop half its incoming connections when traffic spikes is enough to make anyone want to quit and become a farmer. You check the CPU, you check the memory, and everything looks fine, but the kernel is quietly screaming “no” at the network stack.
💡 The Fix
You need to increase the netdev_max_backlog so your NIC has a bigger buffer to hold incoming packets before the kernel discards them. It’s an easy one-line change that keeps your server responsive when things get busy.
sysctl -w net.core.netdev_max_backlog=5000
sysctl -p
⚙️ Why It Works
By cranking this value up, you’re giving the kernel more breathing room to process frames before they hit the ring buffer overflow limit. Most systems default to a puny 1000, which is barely enough for a modern workload that sees anything resembling real traffic.
🚀 Pro-Tip: Check if your NIC is actually dropping packets with ‘ethtool -S eth0 | grep drop’ before you go changing kernel settings blindly.
Linux Tips & Tricks | © ngelinux.com | 8/23/2026
