Causes of congestion

Scenario 1

  • one router, infinite buffers
  • input, output link capacity: 𝑅
  • two flows
  • no retransmissions needed

image|w60

The characteristics of πœ†in and πœ†out when πœ†in approaches 𝑅2:

image|w60

Scenario 2

  • one router, finite buffers
  • sender retransmits lost, timed-out packet
  • application-layer input = application-layer output: πœ†in=πœ†out
  • transport-layer input includes retransmissions: πœ†inβ€²>πœ†in

image|w60

The characteristics of πœ†inβ€² and πœ†out when πœ†in approaches 𝑅2:

image|w60

AIMD (Additive Increase Multiplicative Decrease)

Ideas: sender increases transmission rate (congestion window size) additively until packet loss is detected, then decreases multiplicatively.

image|w70

Why not decrease additively?

When there already had an congestion, additive decrease is too slow to reduce the sending rate, which may lead to persistent congestion. It also conforms to the idea of being aggressive in utilizing bandwidth, but conservative in backing off.

TCP Slow Start

TCP slow start is used at the early stage of the TCP connection to quickly find the available bandwidth.

  • Initially, congestion window size = 1 MSS (which means one segment can be sent).

  • Each time an ACK is received:

    cwnd𝑖=cwndπ‘–βˆ’1+1MSS

It seems that the congestion window size increases linearly, but in fact it increases exponentially, because each ACK acknowledges one segment:

image|w40

TCP Congestion Avoidance

Let’s combine AIMD and slow start, the full picture of TCP congestion control comes out:

  • Initially, congestion window size = 1 MSS (slow start).
  • The slow start process will stop when either:
    • Congestion window size β‰₯ ssthresh (slow start threshold), or
    • Packet loss is detected.
  • Continue to grow the window size but with additive increase
  • When packet loss (either by three duplicated ACKs or retransmission timeout) happens, either enter:

Note: ssthresh is usually set 12 the value of congestion window size when packet loss is detected.

TCP Tahoe

When the packet loss is detected (either by timeout or 3 duplicate ACKs):

  • do the fast retransmit (if 3 duplicate ACKs received)
  • set cwnd=1MSS and enter slow start

TCP Reno

When 3 duplicated ACKs is detected:

  • do the fast retransmit (if 3 duplicate ACKs received)
  • Enter fast recovery:
    • set ssthresh=cwnd2
    • set cwnd=ssthresh (some implementations set it to ssthresh+3MSS)
    • re-enter congestion avoidance (additive increase)

When retransmission timeout (RTO) happens:

  • set cwnd=1MSS
  • enter slow start

image|w60