Fixing laggy TCP connections with slow start settings
Performance Tuning & Kernel Parameters (Sysctl)
Fixing laggy TCP connections with slow start settings
🧩 The Challenge
Dealing with high-latency links where your transfers just sit there crawling because the kernel is playing it too safe with its initial congestion window. It’s infuriating when you know the bandwidth is there, but the handshake takes forever to actually ramp up to line speed.
💡 The Fix
Crank up the initial congestion window in your sysctl settings to bypass the sluggish default ramp-up period. You will see an immediate difference on long-fat networks where the RTT is high.
sysctl -w net.ipv4.tcp_slow_start_after_idle=0
sysctl -w net.ipv4.tcp_init_cwnd=10
⚙️ Why It Works
Setting the idle timeout to zero keeps the window from resetting every time the pipe pauses, and bumping the initial window size allows the server to send more data before waiting for that first acknowledgement. By default, Linux is way too conservative here for modern high-speed infrastructure.
🚀 Pro-Tip: Don’t forget to put these in /etc/sysctl.d/99-networking.conf unless you want to lose your sanity after the next reboot.
Linux Tips & Tricks | © ngelinux.com | 7/12/2026
