Stop your network stack from choking on massive bursts of incoming packets
Performance Tuning & Kernel Parameters (Sysctl)
Stop your network stack from choking on massive bursts of incoming packets
🧩 The Challenge
You’ve probably seen your app start dropping connections out of nowhere during a sudden spike in traffic, even though the CPU looks totally fine. I spent three days digging through logs before realizing the kernel’s default input queue just wasn’t big enough to handle the sheer volume of packets hitting the NIC.
💡 The Fix
Increase the net.core.netdev_max_backlog so your kernel has a larger waiting room for packets before it decides to throw them away. This keeps your application from getting overwhelmed by intermittent bursts.
sysctl -w net.core.netdev_max_backlog=5000
sysctl -p
⚙️ Why It Works
By cranking this value up, you are effectively giving the kernel more breathing room to buffer frames while the network stack processes them. It’s a simple change, but it stops that silent packet loss that drives you crazy during a sudden traffic surge.
🚀 Pro-Tip: Pair this with a larger net.core.rmem_max buffer if you’re dealing with high-bandwidth UDP streams.
Linux Tips & Tricks | © ngelinux.com | 10/22/2026
