Site icon New Generation Enterprise Linux

Stop your TCP stack from stalling on high-latency links

Performance Tuning & Kernel Parameters (Sysctl)

Stop your TCP stack from stalling on high-latency links

🧩 The Challenge

Dealing with a server that acts like it has a clogged pipe despite having plenty of bandwidth? I spent three days digging through application logs before realizing the kernel was just being way too conservative with its window scaling.

💡 The Fix

Flip the window scaling and autotuning parameters to let the kernel actually use the memory available for buffering. It’s a massive win for throughput on long-distance connections.

sysctl -w net.ipv4.tcp_window_scaling=1
sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216"
sysctl -w net.ipv4.tcp_wmem="4096 65536 16777216"

⚙️ Why It Works

These settings tell the TCP stack to ignore the old-school 64KB limit and dynamically adjust the buffer size based on actual traffic demand. You’re effectively taking the training wheels off your network interface.

🚀 Pro-Tip: Always double check net.core.rmem_max and wmem_max or the kernel will just cap you anyway regardless of what you set in the TCP specific keys.

Linux Tips & Tricks | © ngelinux.com | 8/18/2026

0 0 votes
Article Rating
Exit mobile version