This is a good high-level summary of TCP slow start, but let me expand on this to provide a more complete and detailed explanation, while also clarifying some nuances and adding important context.
The user has given a basic outline:
- Congestion window (cwnd) starts at 1 MSS
- Grows exponentially with ACKs
- Used to gauge network capacity
- At ssthresh (slow start threshold), switches to linear growth (congestion avoidance)
Let me build on this with more details and corrections where needed:
TCP Slow Start - Detailed Explanation
Why Slow Start Exists
- TCP needs to discover the network's capacity without overwhelming it
- Starting with a large cwnd could immediately cause congestion
- Slow start is a conservative, probing approach
How Slow Start Works
Initial State:
- cwnd = 1 MSS (Maximum Segment Size)
- ssthresh = typically 65535 bytes (large value, effectively disabled initially)
- RTT = round trip time
Growth Mechanism:
- For EVERY ACK received, cwnd increases by 1 MSS
- In one RTT, sender can transmit cwnd bytes
- For each segment ACKed, cwnd grows by 1 MSS
- This means cwnd can double every RTT (exponential growth)
Example:
-
RTT 0: cwnd = 1, send 1 segment
-
RTT 1: receive 1 ACK, cwnd = 2, send 2 segments
-
RTT 2: receive 2 ACKs, cwnd increases by 2, now cwnd = 4, send 4 segments
-
RTT 3: receive 4 ACKs, cwnd increases by 4, now cwnd = 8, send 8 segments
-
Growth: 1 → 2 → 4 → 8 → 16... (exponential: 2^n)
-
The exponential phase can't continue indefinitely—once cwnd reaches ssthresh, the algorithm shifts to congestion avoidance, which increases cwnd by roughly 1 MSS per RTT instead. This linear growth is much more conservative and prevents the network from becoming overwhelmed. When packet loss is detected through timeout or duplicate ACKs, cwnd resets and ssthresh is halved, forcing the algorithm to probe more carefully before ramping up again. The initial window can be set to min(4 * MSS, max(2 * MSS, 4380 bytes)) according to RFC 3390, allowing for faster starts than the traditional 1 MSS approach.
Throughout a connection's lifecycle, the sender initializes cwnd and ssthresh at the start, then enters slow start where cwnd grows exponentially until reaching ssthresh. Once there, it transitions to congestion avoidance with linear growth. Any loss event triggers a reset of both parameters and either slow start or fast recovery depending on the detection method. The key distinction is that cwnd increases by 1 MSS per ACK received, not per round-trip time—the exponential doubling emerges naturally from receiving multiple ACKs within a single RTT. Slow start fundamentally operates as a probing mechanism to discover available network capacity.
Beyond the standard algorithm, modern implementations employ several refinements: Hystart exits slow start before reaching ssthresh to preempt losses, while alternatives like CUBIC and BBR replace the traditional congestion control logic entirely with different approaches to bandwidth estimation and window management.
TCP Slow Start: A Complete Picture
Your summary captures the essence well. Here's the detailed mechanism:
Core Behavior
| Phase | Growth | Trigger | cwnd Calculation |
|---|
| Slow Start | Exponential | cwnd < ssthresh | cwnd += 1 MSS per ACK |
| Congestion Avoidance | Linear | cwnd ≥ ssthresh | cwnd += 1/cwnd per ACK (~+1 per RTT) |
The Exponential Growth Pattern
RTT 0: cwnd=1 MSS → send 1 segment
RTT 1: +1 ACK → cwnd=2 MSS → send 2 segments
RTT 2: +2 ACKs → cwnd=4 MSS → send 4 segments
RTT 3: +4 ACKs → cwnd=8 MSS → send 8 segments
Growth: 1 → 2 → 4 → 8 → 16... (doubles per RTT)
Key point: cwnd increases by 1 MSS for each ACK received, not per RTT. The doubling emerges from receiving multiple ACKs in one round trip.
Why This Strategy?
- Exponential phase = aggressive probing without blind flooding
- Switch point = ssthresh prevents overshooting network capacity
- Linear phase = fine-tune around equilibrium point
Upon Congestion (Packet Loss)
Timeout detected:
ssthresh ← max(flight_size / 2, 2 × MSS)
cwnd ← 1 MSS
(restart slow start with lower ceiling)
Duplicate ACKs detected (Fast Recovery):
ssthresh ← max(flight_size / 2, 2 × MSS)
cwnd ← ssthresh + 3 × MSS
(skip slow start, enter recovery faster)
Modern Updates (RFC 3390)
Initial window now larger: IW = min(4 × MSS, 4380 bytes) instead of 1 MSS, reducing latency for short transfers.
Any aspects of the algorithm you'd like me to clarify further?