Performance Tuning & Kernel Parameters (Sysctl)
Keep your network buffers from drowning during traffic spikes
🧩 The Challenge
Dealing with high-throughput applications that suddenly drop packets when a burst hits is enough to make anyone want to quit. You watch the interface counters climb in ethtool while the application logs tell you absolutely nothing useful.
💡 The Fix
Bumping up your TCP receive and send window buffers lets the kernel hold onto more data when the application isn’t ready to pull it off the wire fast enough. It’s an easy way to stop those mystery drops without rewriting your entire stack.
sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216
sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216"
sysctl -w net.ipv4.tcp_wmem="4096 65536 16777216"
⚙️ Why It Works
Expanding these limits gives the TCP stack more breathing room to handle window scaling for high-bandwidth, high-latency connections. Without this, the kernel defaults are often stuck in the early 2000s and just can’t keep up with modern gigabit+ traffic.
🚀 Pro-Tip: Always verify your changes stick after a reboot by adding them to /etc/sysctl.d/99-network-tuning.conf instead of just running the commands live.
Linux Tips & Tricks | © ngelinux.com | 7/16/2026
