Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

TCP Congestion Window

Direct answer

The congestion window is the limit a TCP sender places on itself: how much data may be in flight unacknowledged. It grows while acknowledgments arrive and is cut when loss is detected.

When to use this

Use it when throughput is far below the link speed although the receiver's window is large, or to explain why a little loss or a long distance costs so much.

First 30 seconds

1. On the sender: ss -ti dst <ip> — cwnd, round-trip time, retrans.

2. Retransmissions climbing and cwnd small → loss on the path is the limit.

3. cwnd large → the limit is the receiver's window or the application.

4. Long path with some loss → consider BBR on the sender.

5. Many short requests → reuse connections to avoid slow start each time.

Operational verification

connection starts in slow start → window doubles per round trip → congestion avoidance → loss cuts the window → throughput ≈ min(congestion window, receive window) ÷ round-trip time

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commandss -ti dst 192.0.2.10
Scope / prerequisiteUse it when throughput is far below the link speed although the receiver's window is large, or to explain why a little …
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification workflow Verify boundary
ss -ti dst 192.0.2.10
sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_available_congestion_control
nstat -az | grep -Ei 'retrans|TCPLoss'

On the sending Linux host, ss -ti shows for each connection the algorithm in use, cwnd (in segments), ssthresh, the round-trip time, the delivery rate, and retrans counts — plus, where the kernel provides them, how much of the time the connection was limited by the receiver's window (rwnd_limited), by the send buffer, or by the application. The sysctl line shows the default algorithm. nstat gives system-wide loss and retransmission counters.

From a capture, the window can only be inferred: at any moment, the bytes sent and not yet acknowledged cannot exceed it. Wireshark's time/sequence and throughput graphs show the saw-tooth and the slow start at the beginning.

Known-good: the window grows to a stable level with few reductions, and the connection is limited by the application or the receiver more than by loss.

Step 2 Failure isolation workflow Narrow the fault
  • Throughput far below the link speed, with a large receive window. The congestion window is the limit: loss on the path keeps cutting it.
  • A saw-tooth with frequent sharp drops. Recurring loss — a congested queue or a faulty link.
  • Long-distance transfers are much slower than local ones on the same loss rate. The round-trip time multiplies the effect; consider BBR on the sender.
  • Each request is slow to get going. Slow start on new or idle connections; reuse connections.
  • Throughput collapses to almost nothing for a moment. A timeout reset the window to one segment.
  • One stream is slow, several in parallel are fast. Each has its own window; the single stream is loss-limited.
  • cwnd is large and the transfer is still slow. The limit is elsewhere: the receiver's window or the application producing data slowly.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

It is never in a packet — it lives in the sender. Throughput is roughly window ÷ round-trip time, and with loss-based algorithms it falls steeply with loss. Short transfers end in slow start before reaching full speed. BBR tolerates random loss far better than CUBIC.

Key checks
  • ss -ti dst <ip> on the sender — algorithm, cwnd, ssthresh, round-trip time, delivery rate, retrans.
  • sysctl net.ipv4.tcp_congestion_control — the default algorithm.
  • nstat -az | grep -Ei 'retrans|TCPLoss' — system-wide loss counters.
  • Wireshark throughput and time/sequence graphs — the saw-tooth.
ReferenceWhat it is1 section · depth on demand

Mental model

The congestion window is a limit the TCP sender imposes on itself: the amount of data it allows to be in flight, sent but not yet acknowledged. The sender raises it while things go well and lowers it when it detects loss. It is how TCP adapts its speed to a network whose capacity it cannot see.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

The congestion window is why a connection starts slowly, why a little packet loss costs so much throughput, and why two connections over the same link can have very different speeds. It never appears in a packet — it exists only in the sender's memory — so its effect has to be recognised from behaviour, or read from the sending host.

ReferenceHow it works1 section · depth on demand

How it works

Two limits apply at once. The sender may have in flight no more than the smaller of the receiver's advertised window and its own congestion window. Roughly: throughput ≈ window ÷ round-trip time.

How the window moves (in the classic scheme):

1. Slow start. A new connection begins with a small window, about ten segments. For every acknowledgment the window grows, which doubles it each round trip. Growth is exponential — but from a low start, so short transfers finish before reaching full speed.

2. Congestion avoidance. Past a threshold, growth becomes cautious: about one segment more per round trip.

3. On loss detected by duplicate acknowledgments, the window is cut — halved in the original algorithm, reduced by about 30 % in CUBIC — and growth resumes from there.

4. On a retransmission timeout, the window collapses to one segment and slow start begins again.

The result is the saw-tooth pattern of TCP throughput: climb, cut, climb.

Algorithms. CUBIC, the default on Linux and Windows, follows the scheme above with a growth curve suited to fast, long paths. BBR takes a different approach: it estimates the path's bottleneck rate and round-trip time and paces to that, and does not treat every loss as congestion — which makes it far more tolerant of random loss.

Consequences.

  • Loss is expensive. With loss-based algorithms, attainable throughput falls roughly with the square root of the loss rate and in inverse proportion to the round-trip time. A 1 % loss on a 100 ms path limits a connection to roughly one or two megabits per second, however fast the link.
  • Distance matters. The window grows once per round trip, so a long path recovers slowly.
  • Short transfers are dominated by slow start. Most web requests end before the window has opened up.
  • Idle connections start over. After a pause, the window is reduced again.
  • Parallel connections each have their own window, which is why several streams together outrun one.
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

The congestion window in detail

The congestion window (cwnd) is the sender's own limit on unacknowledged data. RFC 5681 says a sender may never have more data outstanding than the smaller of cwnd and the receiver's advertised window (rwnd). While cwnd is below the slow start threshold (ssthresh), it grows by up to one segment for each acknowledged segment (slow start), roughly doubling every round trip. Above ssthresh it grows by about one segment per round trip (congestion avoidance).

Reactions to loss (RFC 5681)

Eventssthreshcwnd
Three duplicate ACKs (fast retransmit and fast recovery)max(FlightSize / 2, 2 × SMSS)ssthresh + 3 segments, then back to ssthresh when new data is acknowledged
Retransmission timeoutmax(FlightSize / 2, 2 × SMSS)1 segment (loss window); slow start again
Idle longer than the RTOunchangedReduced to the restart window, min(IW, cwnd)

Initial window (RFC 5681)

SMSSInitial window
Over 2190 bytes2 segments
1096–2190 bytes3 segments
1095 bytes or less4 segments

Modern stacks commonly use 10 segments, following later experimental specifications.

Why a little loss costs a lot

Each loss roughly halves cwnd, and congestion avoidance then regrows it by only one segment per RTT. On a 40 ms path with 1448-byte segments, recovering from 400 to 800 segments takes about 400 RTTs, or 16 seconds. That is why 0.1 % loss can noticeably reduce throughput on long paths.

host$ ss -ti dst 10.30.0.15 | grep -o "cubic\|bbr\|cwnd:[0-9]*\|ssthresh:[0-9]*\|retrans:[^ ]*\|delivery_rate [^ ]*"
cubic
cwnd:212
ssthresh:180
retrans:0/14
host$ sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_available_congestion_control
host$ sysctl net.ipv4.tcp_slow_start_after_idle

Congestion control algorithms

AlgorithmReacts toNotes
Reno (RFC 5681)LossThe baseline the RFC describes
CUBICLossDefault on Linux and Windows; grows faster on long paths
BBRMeasured bandwidth and RTTLess sensitive to random loss

RFC 9293 allows alternatives to the RFC 5681 algorithms if they meet the IETF's congestion control guidelines.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 9293

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → TCP Congestion Window. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc9293.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
congestion windowtcp cwnd
Confirmation

Confirm action

Continue?