bandwidth-delay product (BDP)

term

networkingISP & telecom

Kept in this browser · My desk

A path's bottleneck rate multiplied by its round-trip time: the amount of data that must be in flight, sent and not yet acknowledged, to keep the path full.

It turns latency into a buffer size. A Transmission Control Protocol (TCP) sender delivers at most one window per round trip, so its throughput is at most the window divided by the round-trip time, and it fills a path only if both its congestion window and the receiver's window reach the product. A 100 Mbit/s path with a 40 ms round trip needs 500,000 bytes in flight; the 64 KiB that fit in TCP's 16-bit window field cap the same path at about 13 Mbit/s. That is why window scaling exists, why receive buffers are tuned, and why a fast link to a distant server can be slow for one connection.

What it is. The bandwidth-delay product (BDP) is the volume of a path: its rate multiplied by its round-trip time (RTT). Request for Comments (RFC) 6349, the Internet Engineering Task Force (IETF) framework for TCP throughput testing (August 2011), writes it as BDP (bits) = RTT (sec) x BB (bps), where BB is the bottleneck bandwidth and the RTT stands for the delay, and divides by 8 to obtain the minimum TCP receive window in bytes. A sender that keeps less than this in flight leaves the pipe partly empty for part of every round trip; one that keeps more only builds a queue somewhere.

Why it governs TCP. The Transmission Control Protocol (TCP) may have in flight no more than the minimum of its congestion window and the receiver's advertised window (RFC 5681), and it can deliver at most that much per round trip. RFC 6349 states the consequence as TCP Throughput = RWND x 8 / RTT, RWND being the TCP receive window (RWND), with its own example: a 100 Mbit/s path with a 5 ms round trip and a 16 KB receive window gives 128,000 bits / 0.005 s = 25.6 Mbit/s, a quarter of the link. Throughput is therefore bounded by window / RTT however fast the link is.

The 16-bit ceiling and the long fat network. RFC 7323 (September 2014), which obsoletes RFC 1323, itself built on RFC 1072 and RFC 1185, names the problem in its first section: TCP performance problems arise when the bandwidth * delay product is large, and such paths are called long, fat networks (LFN). The TCP header reports the receive window in a 16-bit field, so without an extension the largest window is 2^16 bytes, 64 KiB, and on a path whose BDP exceeds that the window limits throughput. The Window Scale option of RFC 7323 multiplies the field by a power of two negotiated in the SYN (synchronize) segments, with an exponent of at most 14, for a maximum window of 2^30 bytes, 1 GiB. The same section names the second LFN problem: losses can have a catastrophic effect on throughput, which is why selective acknowledgements are required to recover several losses per window.

Worked, by hand. Take one 100 Mbit/s path at three distances. At a 5 ms round trip the BDP is 100,000,000 x 0.005 / 8 = 62,500 bytes; at 40 ms, 500,000 bytes; at 150 ms, 1,875,000 bytes. Now cap the window at 65,535 bytes, the most the unscaled field can say: the ceiling is 65,535 x 8 / RTT, which is about 104.9 Mbit/s at 5 ms (above the link, so the window is not the limit), about 13.1 Mbit/s at 40 ms and about 3.5 Mbit/s at 150 ms. The link and the window are the same in all three cases; only the latency changed. To cover 1,875,000 bytes the receiver needs a scale exponent of 5, because 65,535 x 2^5 = 2,097,120 bytes is the first power of two that is enough. RFC 6349's own table gives the same arithmetic for classic circuits: a T1 at 1.536 Mbit/s and 20 ms needs 30,720 bits, about 3.84 KB; a T3 at 44.21 Mbit/s and 25 ms needs about 1,105,250 bits, about 138 KB; a 10 Gbit/s path at 0.30 ms needs 3,000,000 bits, 375 KB.

Asymmetry and buffers. Each direction has its own product. RFC 6349's example is an asymmetric digital subscriber line (ADSL) with a 90 ms round trip, 5 Mbit/s down and 640 kbit/s up: the downstream BDP is about 450,000 bits and the upstream only about 57,600. The same document says that for optimal results the send socket buffer MUST be adjusted to the same value at each end, because the sender's buffer bounds what it can keep in flight just as the receiver's window does.

History. The term predates the option. Van Jacobson and Michael J. Karels, in Congestion Avoidance and Control (November 1988), argued that slow-start, which takes R log2 W to open a window of W packets, opens it quickly enough to have a negligible effect even on links with a large bandwidth-delay product. Mathis, Semke, Mahdavi and Ott (July 1997) added the loss side: in steady congestion avoidance the rate is about (MSS/RTT) x C/sqrt(p), MSS being the maximum segment size (MSS), so for a given loss rate p the achievable rate falls as the round trip grows.

In practice. Linux sizes the receive buffer within net.ipv4.tcp_rmem: a minimum of 4K, a default of 131,072 bytes, which the kernel documentation says results in an initial window of 65,535, and a maximum between 131,072 bytes and 32 MB depending on memory; with net.ipv4.tcp_moderate_rcvbuf enabled the kernel auto-tunes the buffer, no greater than the maximum, to match the size required by the path for full throughput, and tcp_window_scaling is enabled by default. Setting SO_RCVBUF on a socket disables that auto-tuning for it. On a host, ss -ti shows a connection's rtt, cwnd and wscale, enough to compute its BDP and see which window limits it.

What goes wrong. Using the access link's speed instead of the bottleneck's overstates the product. Measuring the RTT under load includes queueing delay, so a bloated buffer makes the BDP look larger than the path. A receive window fixed by an application, or a middlebox that removes the window scale option, quietly caps throughput at window / RTT. And a single TCP connection on a long path may need seconds of slow start to reach the BDP, so short transfers never see it.

Neighbours. The congestion window and the receive window are the two quantities that must reach the BDP; congestion control decides how fast the first grows; latency, throughput and goodput are the measured sides of the same product; bufferbloat is what happens when a queue holds more than it.

Also known as: bdp, bandwidth delay product, long fat network, lfn, produto banda-atraso

Sources

← Back to B Back to the glossary