# TCP flow and congestion control in one sitting: windows, slow start, loss and why latency is bandwidth

> A TCP sender may have in flight no more than the smaller of two windows: the one the receiver advertises, which protects the receiver, and the one the sender computes, which protects the network. This part reads both from the standards that define them, RFC 9293, RFC 7323, RFC 5681 and RFC 6298, with the history from Nagle's congestion collapse of 1984 to Jacobson and Karels in 1988 and CUBIC in 2023, and works everything by hand: the bandwidth-delay product at three round trips, the window scale a long path needs, a congestion window round by round through slow start, a fast retransmit and a timeout, the retransmission timer from three samples, the throughput that loss allows, and the cubic curve. It ends with why Brazil's broadband measurements put their servers at the exchange points. After it you can say, for any path, which window limits a connection and what to change.

Source: https://ronutz.com/en/learn/tcp-flow-and-congestion-control-in-one-sitting  
Updated: 2026-11-23  
Related tools: https://ronutz.com/en/tools/mtu-mss, https://ronutz.com/en/tools/packet-capture-plan-builder, https://ronutz.com/en/tools/python-playground

---

[The opening part of NetFun III](https://ronutz.com/en/learn/ports-sockets-and-the-five-tuple) named a conversation by its five-tuple, and [the TCP connection lifecycle](https://ronutz.com/en/learn/tcp-connection-lifecycle) followed one Transmission Control Protocol (TCP) connection from the handshake to the close, pausing in the middle to say that a sender may keep only so much data in flight. This part stays in that middle and takes it apart. Two windows decide how fast a TCP connection can go: the receive window, which protects the receiver, and the congestion window, which protects the network. Around them sit a timer that decides when to give up waiting, a product of bandwidth and delay that decides how big the windows must be, and forty years of algorithms that decide how a sender learns what the path can carry. Everything here is worked by hand from the standards: after it you can look at a path's speed, its round trip and its loss, and say which window limits a connection, why, and what to change.

## Two windows, two questions

A TCP sender asks two questions before every segment. Can the receiver take more? And can the network? The first is **flow control**, answered by the receiver in every acknowledgement; the second is **congestion control**, which the sender must infer, because no router tells it.

RFC 5681, TCP's congestion control standard (September 2009), names both and states the rule that joins them. The receiver window, rwnd, is "The most recently advertised receiver window"; the congestion window, cwnd, is "A TCP state variable that limits the amount of data a TCP can send", and "At any given time, a TCP MUST NOT send data with a sequence number higher than the sum of the highest acknowledged sequence number and the minimum of cwnd and rwnd" ([RFC 5681, section 2](https://www.rfc-editor.org/rfc/rfc5681.html#section-2)). In one line: data in flight ≤ min(cwnd, rwnd). The rest of this part is about each term of that minimum and about what it costs when either is too small.

## Flow control: the receive window

### The field

The window travels in every TCP header. RFC 9293, the TCP standard since August 2022, defines it as "The number of data octets beginning with the one indicated in the acknowledgment field that the sender of this segment is willing to accept", and adds that "The value is shifted when the window scaling extension is used" ([RFC 9293, section 3.1](https://www.rfc-editor.org/rfc/rfc9293.html#section-3.1)). It is a credit: "the range of sequence numbers the sender of the window (the data receiver) is currently prepared to accept", with "an assumption that this is related to the data buffer space currently available for this connection" ([RFC 9293, section 3.8.6](https://www.rfc-editor.org/rfc/rfc9293.html#section-3.8.6)).

The standard is frank about the trade-off: "Indicating a large window encourages transmissions. If more data arrives than can be accepted, it will be discarded", while "Indicating a small window may restrict the transmission of data to the point of introducing a round-trip delay between each new segment transmitted" (section 3.8.6). A receiver may also take back a window it offered, but "This so-called "shrinking the window" is strongly discouraged": a receiver "SHOULD NOT shrink the window", and a sender "MUST be robust against window shrinking" (same section).

### When the window closes

A receiver whose application stops reading advertises a window of zero, and the sender must stop. If the receiver's later window update were lost, both ends would wait for ever, so the sender keeps knocking. RFC 9293 calls it zero-window probing: the sender "must regularly transmit at least one octet of new data (if available), or retransmit to the receiving TCP peer even if the send window is zero", it "SHOULD send the first zero-window probe when a zero window has existed for the retransmission timeout period", and it "SHOULD increase exponentially the interval between successive probes". A closed window can stay closed indefinitely, and "As long as the receiving TCP peer continues to send acknowledgments in response to the probe segments, the sending TCP peer MUST allow the connection to stay open", the standard's example being a printer out of paper ([RFC 9293, section 3.8.6.1](https://www.rfc-editor.org/rfc/rfc9293.html#section-3.8.6.1)). In a capture, a run of one-byte segments answered by acknowledgements with a zero window is not a network fault: it is a receiving application that is not reading.

### Small segments, and the rules against them

Two old problems sit at the edges of flow control. The **silly window syndrome** is "a stable pattern of small incremental window movements resulting in extremely poor TCP performance", which both ends must avoid ([RFC 9293, section 3.8.6.2](https://www.rfc-editor.org/rfc/rfc9293.html#section-3.8.6.2)). The **small-packet problem** is older: John Nagle of Ford Aerospace described in January 1984 how a keystroke sent alone costs a 41-byte packet, "one byte of data, 40 bytes of header", a "4000% overhead" that on loaded networks leads to loss and retransmission ([RFC 896](https://www.rfc-editor.org/rfc/rfc896.html)). His rule survives in RFC 9293: while data is unacknowledged, the sender "buffers all user data (regardless of the PSH bit) until the outstanding data has been acknowledged or until the TCP endpoint can send a full-sized segment" (PSH being the push flag); implementations "SHOULD implement the Nagle algorithm", but "there MUST be a way for an application to disable the Nagle algorithm on an individual connection" ([RFC 9293, section 3.7.4](https://www.rfc-editor.org/rfc/rfc9293.html#section-3.7.4)).

The receiver's side of the economy is the delayed acknowledgement: a receiver "SHOULD implement a delayed ACK", but "the delay MUST be less than 0.5 seconds", and "An ACK SHOULD be generated for at least every second full-sized segment" ([RFC 9293, section 3.8.6.3](https://www.rfc-editor.org/rfc/rfc9293.html#section-3.8.6.3)). The standard warns that Nagle and delayed acknowledgements can interact badly (section 3.7.4): a sender waiting for an acknowledgement before sending its small segment, and a receiver delaying that acknowledgement, can stall each other for up to the delay.

### Sixteen bits, and the window scale

The window field has 16 bits. RFC 7323 (September 2014) draws the consequence: "the largest window that can be used is 2^16 = 64 KiB", and on paths where "the bandwidth * delay product exceeds 64 KiB, the receive window limits the maximum throughput of the TCP connection over the path"; it calls such paths a "long, fat network" (LFN) ([RFC 7323, section 1.1](https://www.rfc-editor.org/rfc/rfc7323.html#section-1.1)).

The fix is the Window Scale option, three bytes (kind 3, length 3, a shift count) that both ends must send in their SYN segments: "This option is an offer, not a promise; both sides MUST send Window Scale options in their `<SYN>` segments to enable window scaling in either direction." The sender of the option then "will right-shift its true receive-window values by 'shift.cnt' bits", the window in a SYN itself "MUST NOT be scaled", and "The maximum scale exponent is limited to 14 for a maximum permissible receive window size of 1 GiB (2^(14+16))" ([RFC 7323, section 2.2](https://www.rfc-editor.org/rfc/rfc7323.html#section-2.2)). The option exists only in the handshake, which is why a capture that starts after the handshake cannot tell what a window value really means, and why a middlebox that strips the option in the SYN quietly caps every connection through it at 64 KiB.

On Linux, window scaling is on by default (`tcp_window_scaling`, "default: enabled"), the default receive buffer of 131,072 bytes "results in initial window of 65535", and the buffer then grows by auto-tuning up to a maximum "between 131072 and 32MB, depending on RAM size"; an application that sets its own buffer size with SO_RCVBUF disables that auto-tuning for its socket ([Linux kernel documentation, IP Sysctl, tcp_rmem](https://docs.kernel.org/networking/ip-sysctl.html); [Linux man-pages, tcp(7)](https://man7.org/linux/man-pages/man7/tcp.7.html)).

## Why latency is bandwidth

A sender can put at most one window on the path, then must wait a round trip for the acknowledgements that let it send the next. So the throughput of one connection can never exceed window ÷ round-trip time, whatever the link rate. To fill a link, the window must be at least the link rate multiplied by the round trip: the **bandwidth-delay product** (BDP). RFC 6349, the framework for TCP throughput testing (August 2011), writes both formulas: "BDP (bits) = RTT (sec) X BB (bps)", the minimum receive window is "BDP / 8" in bytes, and "TCP Throughput = TCP RWND X 8 / RTT" ([RFC 6349, section 3.3.1](https://www.rfc-editor.org/rfc/rfc6349.html#section-3.3.1)). RTT is the round-trip time and BB the bottleneck bandwidth.

First the standard's own example, as a check: "a 100-Mbps IP path with 5-ms RTT and a TCP RWND of 16 KB" gives 16,000 bytes × 8 ÷ 0.005 s = 25.6 Mbit/s (RFC 6349, section 3.3.1). One quarter of the link, from a window too small for it.

### Worked example: the same link at three distances

Take a 100 Mbit/s path and three round trips: 5 ms (a server in the same metropolitan area), 40 ms (another region of a large country) and 150 ms (another continent). The figures are illustrative distances, not measurements.

| Round trip | BDP = 100,000,000 × RTT ÷ 8 | Throughput with a 65,535-byte window = 65,535 × 8 ÷ RTT | What limits the connection |
|---|---|---|---|
| 5 ms | 62,500 bytes | 104.9 Mbit/s, so the full 100 | the link: the window is larger than the BDP |
| 40 ms | 500,000 bytes | 13.1 Mbit/s | the window: 13% of the link |
| 150 ms | 1,875,000 bytes | 3.5 Mbit/s | the window: 3.5% of the link |

*Interactive lab: Find what limits one TCP connection (use it on the page: https://ronutz.com/en/learn/tcp-flow-and-congestion-control-in-one-sitting#lab-tcp-window-ceiling)*

Nothing about the link changed between the rows; only the distance did. That is the sense in which latency is bandwidth: for one connection with a fixed window, multiplying the round trip by 30 divides the throughput by 30.

To fill the 150 ms path, the receiver must offer 1,875,000 bytes. The largest unscaled value is 65,535, so the shift count must satisfy 65,535 × 2^s ≥ 1,875,000: 2^s ≥ 28.6, so s = 5 (a factor of 32), which allows 65,535 × 32 = 2,097,120 bytes. Both ends must have offered the option in the handshake, and the receiver must actually have the buffer: with Linux's defaults, auto-tuning has to grow the buffer well past its 131,072-byte start before this connection can fill the path. The [TCP connection lifecycle](https://ronutz.com/en/learn/tcp-connection-lifecycle) carries a lab that computes the same ceiling for any window and round trip, and [the BIG-IP protocol profiles](https://ronutz.com/en/learn/bigip-l4-protocol-profiles) show the same arithmetic in a full proxy's settings.

## Congestion control: why the network needed one

Flow control protects the receiver; nothing in it stops a dozen senders from overflowing a router between them. Nagle's 1984 memo already used the phrase "congestion collapse" for networks where retransmissions of lost packets crowd out new data until "throughput may drop so low that TCP connections are aborted" (RFC 896). Two years later it happened on the internet. Van Jacobson of Lawrence Berkeley Laboratory and Michael J. Karels of the University of California at Berkeley opened their paper of November 1988 with the event: "In October of '86, the Internet had the first of what became a series of 'congestion collapses'", during which "the data throughput from LBL to UC Berkeley (sites separated by 400 yards and two IMP hops) dropped from 32 Kbps to 40 bps", a "factor-of-thousand drop" ([Jacobson and Karels, Congestion Avoidance and Control, 1988](https://ee.lbl.gov/papers/congavoid.pdf)). LBL is Lawrence Berkeley Laboratory; an IMP was an Interface Message Processor, the packet switch of the early network.

Their diagnosis was that the cause lay "in transport protocol implementations (not in the protocols themselves)", and their remedy was a principle, "conservation of packets": a connection in equilibrium should put a new packet into the network only when an old one leaves. They listed "seven new algorithms" put into the 4BSD (Berkeley Software Distribution) TCP, among them "round-trip-time variance estimation", "exponential retransmit timer backoff", "slow-start" and "fast retransmit" (Jacobson and Karels, 1988). The paper also answers the name: slow start "isn't that slow: it takes time R log2 W where R is the round-trip-time and W is the window size in packets". RFC 5681 is the standard form of that work twenty-one years later.

## The four algorithms of RFC 5681

**The initial window.** After the handshake, cwnd starts at IW, bounded by the sender maximum segment size (SMSS): "If SMSS > 2190 bytes: IW = 2 * SMSS", if it is between 1,096 and 2,190 bytes, "IW = 3 * SMSS", and if it is 1,095 bytes or less, "IW = 4 * SMSS"; and "if the SYN or SYN/ACK is lost, the initial window used by a sender after a correctly transmitted SYN MUST be one segment" ([RFC 5681, section 3.1](https://www.rfc-editor.org/rfc/rfc5681.html#section-3.1)). RFC 6928 (April 2013) allows a larger start, up to ten segments of 1,460 bytes, as an Experimental RFC ([RFC 6928, section 2](https://www.rfc-editor.org/rfc/rfc6928.html#section-2)).

**Slow start.** "The slow start algorithm is used when cwnd < ssthresh, while the congestion avoidance algorithm is used when cwnd > ssthresh. When cwnd and ssthresh are equal, the sender may use either". During slow start, cwnd grows by at most one SMSS for each acknowledgement of new data, written as equation (2), "cwnd += min (N, SMSS)", N being the bytes newly acknowledged. With one acknowledgement per segment, a window of acknowledgements doubles cwnd every round trip. The threshold ssthresh starts "arbitrarily high (e.g., to the size of the largest possible advertised window)", so the network, not a guess, ends the first slow start (RFC 5681, section 3.1).

**Congestion avoidance.** Above ssthresh, cwnd grows by about one SMSS per round trip, approximated per acknowledgement by equation (3), "cwnd += SMSS*SMSS/cwnd" (section 3.1).

**Loss.** When loss is detected, ssthresh falls to no more than equation (4), "ssthresh = max (FlightSize / 2, 2*SMSS)", FlightSize being "The amount of data that has been sent but not yet cumulatively acknowledged" (sections 2 and 3.1). What happens to cwnd depends on how the loss was found. Found by three duplicate acknowledgements, the sender does a fast retransmit: "The lost segment starting at SND.UNA MUST be retransmitted and cwnd set to ssthresh plus 3*SMSS", inflated by one SMSS for each further duplicate, and set back to ssthresh when an acknowledgement for new data arrives; the reason for not slowing down further is that each duplicate acknowledgement proves a segment "has left the network and is in the receiver's buffer" ([RFC 5681, section 3.2](https://www.rfc-editor.org/rfc/rfc5681.html#section-3.2)). Found by the retransmission timer, cwnd falls to the loss window, "the size of the congestion window after a TCP sender detects loss using its retransmission timer", one full-sized segment, and slow start begins again (sections 2 and 3.1).

## Worked example: a congestion window, round by round

The path: a 10 Mbit/s bottleneck and a 50 ms round trip, so a BDP of 10,000,000 × 0.05 ÷ 8 = 62,500 bytes, about 42.8 full-sized segments. The sender: SMSS of 1,460 bytes, so IW = 3 × 1,460 = 4,380 bytes; ssthresh arbitrarily high; one acknowledgement per segment (no delayed acknowledgements); a receive window large enough never to limit it. The rate column is cwnd × 1,460 × 8 ÷ 0.05 s, the most the window allows in that round.

| Round | Starts at | cwnd (segments) | cwnd (bytes) | What happens | Rate the window allows |
|---|---|---|---|---|---|
| 1 | 0 ms | 3 | 4,380 | slow start | 0.70 Mbit/s |
| 2 | 50 ms | 6 | 8,760 | slow start | 1.40 Mbit/s |
| 3 | 100 ms | 12 | 17,520 | slow start | 2.80 Mbit/s |
| 4 | 150 ms | 24 | 35,040 | slow start | 5.61 Mbit/s |
| 5 | 200 ms | 48 | 70,080 | the window passes the BDP; the bottleneck queue overflows; one segment lost, three duplicate ACKs | 11.21 Mbit/s, more than the link |
| | | | | ssthresh = max(70,080 ÷ 2, 2,920) = 35,040 bytes (24 segments); fast retransmit; cwnd = 24 + 3 = 27 segments while recovering, then 24 | |
| 6 | 250 ms | 24 | 35,040 | congestion avoidance | 5.61 Mbit/s |
| 7 | 300 ms | 25 | 36,500 | congestion avoidance, +1 per round | 5.84 Mbit/s |
| 8 to 13 | 350 to 600 ms | 26 to 31 | 37,960 to 45,260 | congestion avoidance | 6.07 to 7.24 Mbit/s |
| 14 | 650 ms | 32 | 46,720 | the last segments of the window are lost; too few duplicate ACKs come back; the retransmission timer fires | 7.47 Mbit/s |
| | | | | ssthresh = max(46,720 ÷ 2, 2,920) = 23,360 bytes (16 segments); cwnd = loss window = 1 segment; the timer was at least 1 second | |
| 15 | about 1,650 ms | 1 | 1,460 | slow start again | 0.23 Mbit/s |
| 16 | about 1,700 ms | 2 | 2,920 | slow start | 0.47 Mbit/s |
| 17 | about 1,750 ms | 4 | 5,840 | slow start | 0.93 Mbit/s |
| 18 | about 1,800 ms | 8 | 11,680 | slow start | 1.87 Mbit/s |
| 19 | about 1,850 ms | 16 | 23,360 | cwnd = ssthresh: either algorithm; congestion avoidance chosen | 3.74 Mbit/s |
| 20 | about 1,900 ms | 17 | 24,820 | congestion avoidance | 3.97 Mbit/s |

*Interactive lab: Follow the congestion window round trip by round trip (use it on the page: https://ronutz.com/en/learn/tcp-flow-and-congestion-control-in-one-sitting#lab-tcp-congestion-window)*

Four lessons are in the table.

- **Slow start overshoots by design.** It doubles until something breaks; the first loss came when the window reached 48 segments against a path that holds about 43 plus whatever the bottleneck queue holds. Jacobson's bound applies: slow start sources data "at a rate at most twice the maximum possible on the path".
- **A fast retransmit halves; a timeout restarts.** After the first loss the sender continued from 24 segments one round trip later; after the second it fell to one segment and waited for the timer.
- **The timeout cost more than the loss.** Between about 700 ms and 1,650 ms, while the RTO (retransmission timeout) ran, the connection sent almost nothing: some 19 round trips in which, at 32 segments a round, it could have sent about 600 segments. Tail losses that leave too few duplicate acknowledgements are exactly what newer loss detection attacks: RFC 8985's Tail Loss Probe "sends a probe packet to trigger ACK feedback to avoid retransmission timeout (RTO) events" ([RFC 8985, abstract](https://www.rfc-editor.org/rfc/rfc8985.html)).
- **The window, not the link, set the rate.** From round 6 to 14 the window stayed below the BDP, so the 10 Mbit/s link was never full; the connection spent 400 ms climbing from 5.6 to 7.5 Mbit/s at one segment per round trip.

The [TCP connection lifecycle](https://ronutz.com/en/learn/tcp-connection-lifecycle) embeds a lab that recomputes this kind of table for any SMSS, initial window, loss round and detection method.

## The retransmission timer

How long the sender waits before declaring a segment lost is computed, not configured. RFC 6298 (June 2011) gives the procedure. Before any measurement, `RTO <- 1 second`. On the first round-trip measurement R: `SRTT <- R`, `RTTVAR <- R/2`, `RTO <- SRTT + max (G, K*RTTVAR)` with K = 4 and G the clock granularity. On each later measurement R': first `RTTVAR <- (1 - beta) * RTTVAR + beta * |SRTT - R'|`, then `SRTT <- (1 - alpha) * SRTT + alpha * R'`, in that order, "using alpha=1/8 and beta=1/4". And "Whenever RTO is computed, if it is less than 1 second, then the RTO SHOULD be rounded up to 1 second"; a maximum, if any, must be "at least 60 seconds" ([RFC 6298, section 2](https://www.rfc-editor.org/rfc/rfc6298.html#section-2)). SRTT is the smoothed round-trip time and RTTVAR its variation; RTO, the retransmission timeout.

### Worked example: three samples and a slow one

Take G as 1 ms, which never matters here because 4 × RTTVAR is far larger.

| Sample | RTTVAR | SRTT | Computed RTO | RTO after rule (2.4) |
|---|---|---|---|---|
| R = 100 ms | 100 ÷ 2 = 50 | 100 | 100 + 4 × 50 = 300 ms | 1 s |
| R' = 140 ms | 0.75 × 50 + 0.25 × \|100 − 140\| = 37.5 + 10 = 47.5 | 0.875 × 100 + 0.125 × 140 = 87.5 + 17.5 = 105 | 105 + 190 = 295 ms | 1 s |
| R' = 90 ms | 0.75 × 47.5 + 0.25 × \|105 − 90\| = 35.625 + 3.75 = 39.375 | 0.875 × 105 + 0.125 × 90 = 91.875 + 11.25 = 103.125 | 103.125 + 157.5 = 260.6 ms | 1 s |
| R' = 300 ms | 0.75 × 39.375 + 0.25 × \|103.125 − 300\| = 29.53 + 49.22 = 78.75 | 0.875 × 103.125 + 0.125 × 300 = 90.23 + 37.5 = 127.73 | 127.73 + 315 = 442.7 ms | 1 s |

Note the order the standard insists on: the new RTTVAR uses the old SRTT. The slow sample of 300 ms moved SRTT by only 25 ms but almost doubled RTTVAR, which is the point of the variance term: the timer widens when the path becomes unpredictable. With the 1-second floor, every value in the last column is the same; the Linux documentation gives its own minimum, `tcp_rto_min_us`, with "Default: 200000" microseconds, 200 ms ([Linux kernel documentation, IP Sysctl](https://docs.kernel.org/networking/ip-sysctl.html)), so on such a stack a computed 300 ms is not rounded up to 1 second.

When the timer fires, "The host MUST set `RTO <- RTO * 2` ("back off the timer")" (RFC 6298, section 5): 1, 2, 4, 8 seconds for successive losses of the same segment. And samples taken from retransmitted segments are not used at all, because the acknowledgement cannot say which copy it answers: "TCP MUST use Karn's algorithm" (section 3). RFC 6298 also records that the initial RTO was lowered from 3 seconds to 1, "unless the SYN or the ACK of the SYN is lost, in which case the default RTO is reverted to 3 seconds before data transmission begins" (section 7). On Linux, `ss -ti` prints a connection's `rtt:<rtt>/<rttvar>`, `rto:`, `cwnd:` and `ssthresh:`, in the units its manual gives ([Linux man-pages, ss(8)](https://man7.org/linux/man-pages/man8/ss.8.html)), so every quantity in this section can be read on a live host.

## Loss caps throughput too

Windows are not the only limit. If the path drops a fraction p of packets, congestion avoidance's sawtooth sets a ceiling of its own. Matthew Mathis, Jeffrey Semke and Jamshid Mahdavi of the Pittsburgh Supercomputing Center and Teunis Ott of Bellcore derived it in July 1997 from the halving and the one-segment-per-round growth: BW = (MSS ÷ RTT) × C ÷ √p, with "C = √(3/2)" for periodic loss and an acknowledgement per packet, and 0.87 with delayed acknowledgements ([Mathis, Semke, Mahdavi and Ott, The Macroscopic Behavior of the TCP Congestion Avoidance Algorithm, Computer Communication Review 27(3), July 1997](https://courses.cs.duke.edu/fall24/compsci514/readings/mathis-tcpmodel-ccr97.pdf)). MSS is the maximum segment size.

### Worked example: the same loss at three distances

With MSS = 1,460 bytes and C = √1.5 ≈ 1.2247. At 50 ms and one loss in 10,000 (p = 0.0001): MSS ÷ RTT = 1,460 × 8 ÷ 0.05 = 233,600 bit/s; C ÷ √p = 1.2247 ÷ 0.01 = 122.47; the product is 28.6 Mbit/s. The full table:

| Loss rate p | RTT 5 ms | RTT 50 ms | RTT 150 ms |
|---|---|---|---|
| 1 in 100 | 28.6 Mbit/s | 2.86 Mbit/s | 0.95 Mbit/s |
| 1 in 1,000 | 90.5 Mbit/s | 9.05 Mbit/s | 3.02 Mbit/s |
| 1 in 10,000 | 286 Mbit/s | 28.6 Mbit/s | 9.54 Mbit/s |

Read across a row and latency is bandwidth again, now through loss: at the same loss rate, a path ten times longer gives a tenth of the throughput. Read down a column and the square root shows: cutting loss by 100 only multiplies throughput by 10. The model describes Reno-style congestion avoidance with modest loss; it is a ceiling for reasoning, not a prediction for any modern stack.

## Beyond Reno: what changed after 1988

| Mechanism | Standard and status | What it adds |
|---|---|---|
| Selective acknowledgements (SACK) | RFC 2018, October 1996 | the receiver reports which blocks arrived, so the sender "can then retransmit only the missing data segments" ([RFC 2018](https://www.rfc-editor.org/rfc/rfc2018.html)) |
| NewReno | RFC 6582, April 2012 | better fast recovery when several segments are lost in one window ([RFC 6582](https://www.rfc-editor.org/rfc/rfc6582.html)) |
| Explicit Congestion Notification (ECN) | RFC 3168, September 2001 | a router can "set the Congestion Experienced (CE) codepoint in the IP header instead of dropping the packet" ([RFC 3168](https://www.rfc-editor.org/rfc/rfc3168.html)) |
| Active queue management (AQM) | RFC 7567, July 2015 | routers that signal before their queues are full, because "excessive queueing can lead to unwanted delay" ([RFC 7567, section 1.2](https://www.rfc-editor.org/rfc/rfc7567.html#section-1.2)) |
| RACK-TLP | RFC 8985, February 2021 | loss detected by time rather than by counting duplicates, and a probe instead of a timeout at the tail (RFC 8985) |
| CUBIC | RFC 9438, August 2023, a Proposed Standard that updates RFC 5681 | a cubic growth function; "adopted as the default TCP congestion control algorithm by the Linux, Windows, and Apple stacks" ([RFC 9438, abstract](https://www.rfc-editor.org/rfc/rfc9438.html)) |
| BBR | draft-ietf-ccwg-bbr-07, 2 November 2026, an Internet-Draft intended as Experimental | a model of the path's bottleneck bandwidth and round-trip time instead of loss as the signal ([Internet Engineering Task Force (IETF) Datatracker](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/)) |

### Worked example: the cubic curve

CUBIC replaces congestion avoidance's straight line with W_cubic(t) = C × (t − K)³ + W_max, where t is the time since the last reduction, W_max the window just before it, and K "the time period that the above function takes to increase the congestion window size at the beginning of the current congestion avoidance stage to W_max": K = ∛((W_max − cwnd_epoch) ÷ C). The constants are "C SHOULD be set to 0.4", in segments per second cubed, and a multiplicative decrease β of 0.7 instead of RFC 5681's half ([RFC 9438, sections 4.1, 4.2, 4.6 and 5.1](https://www.rfc-editor.org/rfc/rfc9438.html#section-4.2)).

Take W_max = 100 segments. After a loss, cwnd_epoch = 0.7 × 100 = 70, so K = ∛((100 − 70) ÷ 0.4) = ∛75 ≈ 4.217 s. Then:

| t (seconds after the reduction) | t − K | (t − K)³ | 0.4 × (t − K)³ | W_cubic(t), segments |
|---|---|---|---|---|
| 0 | −4.217 | −75.0 | −30.0 | 70.0 |
| 1 | −3.217 | −33.3 | −13.3 | 86.7 |
| 2 | −2.217 | −10.9 | −4.36 | 95.6 |
| 3 | −1.217 | −1.80 | −0.72 | 99.3 |
| 4.217 | 0 | 0 | 0 | 100.0 |
| 6 | 1.783 | 5.67 | 2.27 | 102.3 |
| 8 | 3.783 | 54.1 | 21.7 | 121.7 |

The shape is the design: fast recovery towards the window that last caused trouble, a plateau near it, then a cautious and then accelerating search beyond it. Unlike Reno's one segment per round trip, the curve is a function of time, not of round trips: CUBIC "maintains a window increase rate that is independent of RTTs outside the Reno-friendly region", so flows with different round trips reach similar windows ([RFC 9438, section 3.3](https://www.rfc-editor.org/rfc/rfc9438.html#section-3.3)); section 4.2 also bounds each step, so the target never exceeds 1.5 × cwnd. On Linux the default algorithm for new connections is set by `tcp_congestion_control`, whose value "is set as part of kernel configuration", with "reno" always available ([Linux man-pages, tcp(7)](https://man7.org/linux/man-pages/man7/tcp.7.html)); `ss -ti` shows the algorithm a connection uses (ss(8)).

The BBR draft describes itself against the loss-based family: it "uses recent measurements of a transport connection's delivery rate, round-trip time, and packet loss rate to build an explicit model of the network path", and claims "substantially lower queueing delays for bottlenecks with deep buffers (avoiding "bufferbloat")" relative to Reno and CUBIC ([draft-ietf-ccwg-bbr-07, abstract](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/)). <Claim status="attributed" by="the BBR Internet-Draft's authors, Google and Meta">The throughput and delay advantages over Reno and CUBIC are the draft's own claims</Claim>, made in a document that is still a draft with Experimental status intended.

## What to read in a capture

- **The window field shrinking towards zero, then one-byte probes:** the receiving application is slow; the network is fine (section 3.8.6.1).
- **Window values that look absurdly small after a capture started mid-connection:** the scale factor was in the SYN you did not capture (RFC 7323).
- **Three duplicate acknowledgements, then a retransmission within a round trip:** fast retransmit; the connection halves and carries on (RFC 5681, section 3.2).
- **Silence of a second or more, then a retransmission:** the retransmission timer; the connection starts again from one segment. Count those, not the total retransmissions, when judging the cost of loss.
- **Throughput that matches window ÷ RTT almost exactly:** a window-limited connection; look at the receive buffer and the scale option before blaming the link.

The [capture plan builder](https://ronutz.com/en/tools/packet-capture-plan-builder) helps decide where to capture so that both ends of these signals are visible, and [the TCP proxy part](https://ronutz.com/en/learn/tcp-proxy-layer-4) explains why a full proxy in the path splits one connection into two control loops with windows of their own.

## The Brazilian angle: where the measurement server stands

Brazil's broadband measurements take the bandwidth-delay arithmetic seriously. SIMET (Sistema de Medições de Tráfego IP de Última Milha, as NIC.br first named it: a system for measuring last-mile IP traffic), the Internet quality measurement system of NIC.br (Núcleo de Informação e Coordenação do Ponto BR), measures "download and upload speed, latency and packet loss" (our translation here and below) between the user's device and a test server, choosing "between a server in the provider's network or NIC.br's servers" ([NIC.br, SIMET](https://simet.nic.br/)). A NIC.br presentation of 17 May 2018 gives the history and the design: in 2007 and 2008 the consumer organization Idec (Instituto de Defesa de Consumidores, as its own site names it), with CGI.br (Comitê Gestor da Internet no Brasil) and NIC.br, tested the three largest providers of the time, NET, Telefônica and TVA, measuring "download/upload speed over TCP and UDP, jitter, latency", with results published in May 2008; SIMET was offered to the customers of the participants of IX.br, the Brazilian internet exchange points (pontos de troca de tráfego, PTT), and by 2010 had measurement infrastructure at the exchange points of São Paulo, Rio de Janeiro, Curitiba, Florianópolis, Belo Horizonte, Fortaleza, Recife and Brasília; in the timeline's 2012 entry, after NIC.br had taken part in and lost the tender to choose the entity that would measure quality for the National Telecommunications Agency (Agência Nacional de Telecomunicações, Anatel), the Entidade Aferidora da Qualidade (EAQ), Anatel, "considering that the EAQ was not measuring at the exchange points", asked NIC.br to place the EAQ's servers at eight exchange points, and the request was met ([NIC.br, SIMET, IX Fórum, 17 May 2018](https://minhaagenda.nic.br/files/apresentacao/arquivo/203/SIMET_IXFORUM_17mai2018A.pdf)).

The same presentation asks the question this part answers, "Where should the Measurement Server be?", and answers it in its design: tests run at IX.br's exchange points, in the network of autonomous system 14026, with servers in autonomous system 22548 for those without access to an exchange point, over IPv4 and IPv6, at a time when IX.br operated in 30 locations, not interconnected (same presentation). The bandwidth-delay table above shows why the choice matters. On a 100 Mbit/s plan, a test connection with a 64 KiB window can show the full 100 Mbit/s to a server 5 ms away and 13 Mbit/s to one 40 ms away, with nothing in the subscriber's access having changed. A measurement meant to judge the access network has to put its server close to that network, or use windows and connections large enough that distance stops being the limit; the exchange points are where the access networks meet.

## What to remember

- Data in flight ≤ min(cwnd, rwnd): the receiver's window protects the receiver; the congestion window protects the network (RFC 5681).
- One connection cannot exceed window ÷ RTT. Filling a path needs a window of at least the bandwidth-delay product; beyond 64 KiB that needs the Window Scale option in both SYNs, up to a shift of 14 and a 1 GiB window (RFC 7323).
- Slow start doubles per round trip until loss or ssthresh; congestion avoidance adds one segment per round trip; three duplicate ACKs halve the window; a timeout drops it to one segment after at least a second.
- RTO = SRTT + 4 × RTTVAR, updated with weights 1/8 and 1/4, rounded up to 1 second by RFC 6298 (Linux's documented floor is 200 ms), doubled on each expiry.
- Loss caps throughput as MSS ÷ RTT × 1.22 ÷ √p for Reno-style flows; at equal loss, a longer path is a slower path. CUBIC (RFC 9438) is the default in Linux, Windows and Apple stacks; BBR is still a draft.

<ReaderQuestions>
- A file transfer between two data centres 120 ms apart runs at 4.3 Mbit/s on a 1 Gbit/s link and never shows a retransmission. Which window is limiting it, and which two things would you check first?
- In the round-by-round table, the connection lost one segment in round 5 and recovered in one round trip, but lost the tail of the window in round 14 and waited a second. What property of the lost segments made the difference, and what does RACK-TLP change about it?
- RFC 6298 rounds the RTO up to 1 second, and Linux documents a 200 ms floor. What does each choice risk on a 2 ms data-centre path, and on a 600 ms satellite path?
- The Mathis table says that at 1% loss a 150 ms path cannot exceed about 1 Mbit/s per connection. How do download managers and browsers that open several connections change that number, and whom does it cost?
- If you were designing a national speed test, where would you place the servers, how many parallel connections would you open, and how would you report a result so that a subscriber far from every server is not misled?
</ReaderQuestions>

## Sources

- [W. Eddy (ed.), RFC 9293, Transmission Control Protocol (TCP), Internet Standard 7, August 2022, RFC Editor text copy: sections 3.1 (the window field), 3.7.4 (Nagle), 3.8.6 (managing the window, shrinking), 3.8.6.1 (zero-window probing), 3.8.6.2 (silly window syndrome) and 3.8.6.3 (delayed ACKs) (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc9293.html)
- [M. Allman, V. Paxson, E. Blanton, RFC 5681, TCP Congestion Control, September 2009, RFC Editor text copy: section 2 (rwnd, cwnd, IW, LW, FlightSize), section 3.1 (initial window, slow start, congestion avoidance, equations 2 to 4) and section 3.2 (fast retransmit and fast recovery) (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc5681.html)
- [D. Borman, B. Braden, V. Jacobson, R. Scheffenegger (ed.), RFC 7323, TCP Extensions for High Performance, September 2014, RFC Editor text copy: section 1.1 (long fat networks, the 64 KiB limit) and section 2.2 (the Window Scale option, shift count up to 14, 1 GiB) (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc7323.html)
- [V. Paxson, M. Allman, J. Chu, M. Sargent, RFC 6298, Computing TCP's Retransmission Timer, June 2011, RFC Editor text copy: sections 2 (SRTT, RTTVAR, RTO, the 1-second floor, the 60-second maximum), 3 (Karn's algorithm), 5 (backoff) and 7 (the initial RTO lowered from 3 seconds to 1) (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc6298.html)
- [J. Nagle, Ford Aerospace and Communications Corporation, RFC 896, Congestion Control in IP/TCP Internetworks, 6 January 1984, RFC Editor text copy: congestion collapse and the small-packet problem (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc896.html)
- [Van Jacobson (Lawrence Berkeley Laboratory) and Michael J. Karels (University of California at Berkeley), Congestion Avoidance and Control, November 1988, PDF at ee.lbl.gov: the October 1986 collapse, conservation of packets, the seven algorithms, slow start's R log2 W (accessed 23 November 2026)](https://ee.lbl.gov/papers/congavoid.pdf)
- [B. Constantine, G. Forget, R. Geib, R. Schrage, RFC 6349, Framework for TCP Throughput Testing, August 2011, RFC Editor text copy: section 3.3.1, the BDP and throughput formulas and the 25.6 Mbit/s example (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc6349.html)
- [J. Chu, N. Dukkipati, Y. Cheng, M. Mathis, RFC 6928, Increasing TCP's Initial Window, April 2013, Experimental, RFC Editor text copy: section 2 (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc6928.html)
- [L. Xu, S. Ha, I. Rhee, V. Goel, L. Eggert (ed.), RFC 9438, CUBIC for Fast and Long-Distance Networks, August 2023, RFC Editor text copy: abstract (the default in Linux, Windows and Apple stacks), section 3.3 (RTT-fairness), sections 4.1 and 4.2 (W_cubic, K, the 1.5 × cwnd bound), 4.6 (β = 0.7) and 5.1 (C = 0.4) (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc9438.html)
- [Matthew Mathis, Jeffrey Semke, Jamshid Mahdavi (Pittsburgh Supercomputing Center) and Teunis Ott (Bellcore), The Macroscopic Behavior of the TCP Congestion Avoidance Algorithm, Computer Communication Review 27(3), July 1997, PDF copy at Duke University: equation (3) and the constants of table 1 (accessed 23 November 2026)](https://courses.cs.duke.edu/fall24/compsci514/readings/mathis-tcpmodel-ccr97.pdf)
- [M. Mathis, J. Mahdavi, S. Floyd, A. Romanow, RFC 2018, TCP Selective Acknowledgment Options, October 1996, RFC Editor text copy: the abstract (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc2018.html)
- [T. Henderson, S. Floyd, A. Gurtov, Y. Nishida, RFC 6582, The NewReno Modification to TCP's Fast Recovery Algorithm, April 2012, RFC Editor text copy (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc6582.html)
- [K. Ramakrishnan, S. Floyd, D. Black, RFC 3168, The Addition of Explicit Congestion Notification (ECN) to IP, September 2001, RFC Editor text copy: the CE codepoint instead of a drop (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc3168.html)
- [F. Baker, G. Fairhurst (eds.), RFC 7567, IETF Recommendations Regarding Active Queue Management, July 2015, RFC Editor text copy: section 1.2, queueing and latency (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc7567.html)
- [Y. Cheng, N. Cardwell, N. Dukkipati, P. Jha, RFC 8985, The RACK-TLP Loss Detection Algorithm for TCP, February 2021, RFC Editor text copy: the abstract (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc8985.html)
- [N. Cardwell, I. Swett, J. Beshay (eds.), draft-ietf-ccwg-bbr-07, BBR Congestion Control, 2 November 2026, IETF Datatracker page and text: intended status Experimental, the abstract (accessed 23 November 2026)](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/)
- [Linux kernel documentation, IP Sysctl: tcp_rmem (131072 bytes, an initial window of 65535, up to 32 MB), tcp_congestion_control, tcp_rto_min_us (default 200000) (accessed 23 November 2026)](https://docs.kernel.org/networking/ip-sysctl.html)
- [Linux man-pages, tcp(7): tcp_window_scaling enabled by default, tcp_moderate_rcvbuf auto-tuning, tcp_congestion_control set at kernel configuration with reno always available (accessed 23 November 2026)](https://man7.org/linux/man-pages/man7/tcp.7.html)
- [Linux man-pages, ss(8): the -i fields rtt, rto, backoff, cwnd, ssthresh, wscale and the congestion algorithm (accessed 23 November 2026)](https://man7.org/linux/man-pages/man8/ss.8.html)
- [Idec, Instituto de Defesa de Consumidores, home page: the organization's name (accessed 23 November 2026)](https://idec.org.br/)
- [NIC.br, SIMET, web page: what the test measures and where the test server can be (accessed 23 November 2026)](https://simet.nic.br/)
- [NIC.br, SIMET, presentation at the IX Fórum, 17 May 2018, PDF: the 2007-2008 tests with IDEC, the exchange points of 2010, the EAQ servers at eight exchange points, autonomous systems 14026 and 22548, 30 IX.br locations (accessed 23 November 2026)](https://minhaagenda.nic.br/files/apresentacao/arquivo/203/SIMET_IXFORUM_17mai2018A.pdf)
