Stop your network stack from dropping packets under high load

Performance Tuning & Kernel Parameters (Sysctl)

Stop your network stack from dropping packets under high load

🧩 The Challenge

Dealing with a web server that just randomly drops connections when traffic spikes is enough to drive anyone crazy. You’ll check the logs, blame the application, and eventually realize the kernel is tossing packets because the receive queue is tiny.

💡 The Fix

Increase the net.core.netdev_max_backlog value to give your NIC a larger buffer to hold packets before the kernel process takes over. It’s one of those silent killers that’ll wreck your tail latency if you ignore it.

sysctl -w net.core.netdev_max_backlog=5000
echo "net.core.netdev_max_backlog = 5000" >> /etc/sysctl.d/99-network-tuning.conf

⚙️ Why It Works

Bumping this limit gives the CPU more breathing room to handle bursts of incoming traffic instead of just dropping frames when the interface gets overwhelmed. It effectively creates a larger waiting room for your packets while the rest of the stack catches up.

🚀 Pro-Tip: Keep an eye on /proc/net/softnet_stat to see if the drop counter is actually moving before you start tweaking values blindly.

Linux Tips & Tricks | © ngelinux.com | 11/13/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted