Stop your TCP stack from choking on window scaling
Performance Tuning & Kernel Parameters (Sysctl)
Stop your TCP stack from choking on window scaling
🧩 The Challenge
Dealing with high-latency connections where your transfers crawl even though the bandwidth is wide open? I’ve spent way too many nights debugging “slow” network pipes only to realize the server was basically refusing to keep enough data in flight.
💡 The Fix
Crank up the TCP memory limits and window scaling to actually let the kernel buffer what the wire can handle. It stops your throughput from hitting an artificial ceiling caused by default, outdated kernel settings.
sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216"
sysctl -w net.ipv4.tcp_wmem="4096 65536 16777216"
sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216
sysctl -w net.ipv4.tcp_window_scaling=1
⚙️ Why It Works
Modern Linux distros ship with conservative buffer limits that haven’t been updated since the dial-up era. By bumping these values, you’re letting the kernel grow the window size dynamically, which is mandatory if you want to saturate a fast link.
🚀 Pro-Tip: Don’t forget to write those to /etc/sysctl.d/99-network-perf.conf or they’ll vanish the second you reboot.
Linux Tips & Tricks | © ngelinux.com | 10/18/2026
