TCP tuning for fast and long-distance networks

Updated November 2026

On a fast link between distant sites, a single TCP connection often moves data far slower than the link allows. The cause is usually not the network but the TCP settings on the two hosts. This section explains why, and how to fix it on Linux, Windows and macOS.

Why defaults can hold you back

TCP may only send a certain amount of data before it must wait for an acknowledgment. That amount, the window, is limited by the socket buffers on both hosts. On a short path, acknowledgments come back quickly and a modest window keeps the link busy. On a long path, the sender spends most of its time waiting. The result: the same two servers that copy at 1 Gbit/s across a data center may manage only a fraction of that across a continent.

The bandwidth-delay product

To fill a path, the window must be at least the bandwidth multiplied by the round-trip time. This is the bandwidth-delay product (BDP). For 1 Gbit/s and a 50 ms RTT: 1,000,000,000 bits/s × 0.05 s = 50,000,000 bits, which is 6.25 MB. A host whose buffers top out at 4 MB cannot keep that path full with one stream, however clean the path is. Window size and BDP works through more examples.

Autotuning does most of the work

Modern systems size TCP buffers automatically for each connection. ESnet notes that autotuning arrived in Linux 2.6, Windows Vista, Mac OS X 10.5 and FreeBSD 7.0, so you rarely need to set default buffer sizes by hand. What still matters is the maximum that autotuning may grow to: on many systems it is too small for 10 Gbit/s or long paths, and raising it is the main job of TCP tuning.

Congestion control: CUBIC and BBR

The congestion control algorithm decides how fast TCP speeds up and how hard it backs off after loss. CUBIC has been the Linux default since kernel 2.6.19 and is a sound choice for most hosts. BBR, developed at Google and in Linux since 4.9, takes a different approach; ESnet notes that it may reduce the impact of packet loss, though it does not eliminate it. ESnet also warns that the original BBR (v1) competes unfairly with CUBIC on shared links, so test before you switch. On Windows, the algorithm appears as the congestion provider; see the platform pages.

When tuning matters

Guides in this section

Sources