Stop your network buffer from dropping packets when the traffic spikes
Performance Tuning & Kernel Parameters (Sysctl)
Stop your network buffer from dropping packets when the traffic spikes
🧩 The Challenge
Dealing with a production web server that starts dropping packets the second a marketing campaign kicks off is infuriating. You watch your NIC stats climb, see the drops, and wonder why the kernel is basically throwing your data in the trash instead of just letting it queue.
💡 The Fix
Bumping up the maximum backlog queue size in the kernel prevents the networking stack from getting overwhelmed by sudden bursts of traffic. It’s an easy way to buy yourself some breathing room when you can’t just throw more hardware at the problem.
sysctl -w net.core.netdev_max_backlog=5000
sysctl -p
⚙️ Why It Works
Increasing this value lets the kernel hold more incoming packets in a buffer before they reach the protocol stack, which effectively smooths out traffic spikes. Without this, your CPU might be busy with a heavy process, and that tiny default queue will fill up and start dumping packets before you can even react.
🚀 Pro-Tip: Check /proc/net/softnet_stat to see if you are actually dropping packets in the softirq backlog before you go changing these values blind.
Linux Tips & Tricks | © ngelinux.com | 8/8/2026
