Stop your Linux box from being a slowpoke with big TCP buffers
Performance Tuning & Kernel Parameters (Sysctl)
Stop your Linux box from being a slowpoke with big TCP buffers
🧩 The Challenge
Dealing with high-latency, high-bandwidth links is a nightmare when your server starts dropping packets because its default TCP buffers are sized for a local office LAN from 2005. I spent an entire Tuesday wondering why my backups to the remote data center were crawling until I realized the kernel was just leaving performance on the table.
💡 The Fix
You need to tune the TCP window size parameters in sysctl to let the kernel hold more data in flight. It is the easiest way to stop your network throughput from hitting a wall.
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 memory buffers allows the TCP stack to handle significantly larger amounts of data without waiting for acknowledgments. Basically, you are giving the kernel enough elbow room to actually saturate the available bandwidth.
🚀 Pro-Tip: Toss those lines into a file in /etc/sysctl.d/ so they survive a reboot, or you’ll be doing this all over again after the next kernel update.
Linux Tips & Tricks | © ngelinux.com | 8/3/2026
