Stop your TCP stack from choking on high-latency links

Performance Tuning & Kernel Parameters (Sysctl)

Stop your TCP stack from choking on high-latency links

🧩 The Challenge

Dealing with a server that barely saturates a 10Gbps link even when ping times are decent is enough to drive you to drink. It’s usually the TCP window scaling hitting a wall because the defaults were written when 56k modems were still a thing.

💡 The Fix

Crank up the maximum TCP receive and send buffers in sysctl to let your traffic flow properly across long-haul connections. You’ll finally see your throughput jump from crawling to actually using the bandwidth you’re paying for.

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 buffers gives the kernel more breathing room to hold unacknowledged packets in memory, which is the only way to keep the pipeline full when latency is higher than zero. Without these changes, the TCP window closes up, effectively throttling your data rate despite having plenty of actual wire capacity.

🚀 Pro-Tip: Always add these to /etc/sysctl.d/99-tcp-performance.conf so you don’t lose your performance gains after a reboot.

Linux Tips & Tricks | © ngelinux.com | 11/30/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted