Stop your network buffer from dropping packets under heavy load
Performance Tuning & Kernel Parameters (Sysctl)
Stop your network buffer from dropping packets under heavy load
🧩 The Challenge
Dealing with a bursty app that decides to flood your network stack only to have the kernel drop half the incoming traffic? It’s a massive headache when your throughput craters and the metrics don’t show any obvious CPU bottleneck.
💡 The Fix
Increase the max receive buffer size for your network sockets. This keeps the kernel from tossing packets into the void when your application isn’t pulling them off the queue fast enough.
sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216
⚙️ Why It Works
These settings bump the maximum allowed buffer memory, giving your application more breathing room during traffic spikes. If you have the RAM to spare, it’s the easiest way to stop packet loss before it hits your application layer.
🚀 Pro-Tip: Don’t forget to put these in /etc/sysctl.d/99-networking.conf so they survive a reboot.
Linux Tips & Tricks | © ngelinux.com | 11/22/2026
