Performance Tuning & Kernel Parameters (Sysctl)
Stop your network buffer from dropping packets when the traffic spikes
🧩 The Challenge
You ever have a box that just chokes the second traffic hits a burst? I spent two full days tracing dropped UDP packets only to find out the kernel was silently punting them because the receive buffer was basically a thimble.
💡 The Fix
Bumping up the maximum receive buffer sizes for the entire system stops the kernel from throwing away data before your application can even sniff it. It is a quick win for high-throughput apps that get overwhelmed during micro-bursts.
sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216
sysctl -p
⚙️ Why It Works
Increasing these values tells the kernel to allocate more memory for network sockets, giving your apps enough headroom to process traffic spikes without hitting the drop threshold. It basically turns that tiny thimble into a proper bucket.
🚀 Pro-Tip: Stick those in /etc/sysctl.d/99-network-buffer.conf so you aren’t chasing the same ghost after a reboot.
Linux Tips & Tricks | © ngelinux.com | 9/26/2026
