Site icon New Generation Enterprise Linux

Stop your server from stalling when it hits a network spike

Performance Tuning & Kernel Parameters (Sysctl)

Stop your server from stalling when it hits a network spike

đź§© The Challenge

Dealing with a production web server that randomly hangs for seconds during high traffic is enough to make you pull your hair out. You dig through the logs and find absolutely nothing, because the kernel is just overwhelmed trying to hand off packet processing.

đź’ˇ The Fix

Crank up the backlog queue for your network interfaces so your system doesn’t drop packets before it even processes them. It gives the CPU a bit more breathing room during sudden bursts of traffic.

sysctl -w net.core.netdev_max_backlog=5000

⚙️ Why It Works

Increasing this value lets the kernel buffer more packets in the input queue before they start hitting the floor, which prevents those nasty micro-hangs when your NIC gets swamped. Just don’t go overboard and set it to a million, or you’ll eat up all your RAM for no reason.

🚀 Pro-Tip: Check your current drops with netstat -s first, so you actually know if the queue is overflowing before you tweak it.

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

0 0 votes
Article Rating
Exit mobile version