Advanced Computer Networks CS716 Advanced Computer Networks By Dr. Amir Qayyum 1
Lecture No. 36
Congestion Control Basics: problem, terminology, approaches, metrics Solutions Router-based: queuing disciplines Host-based: TCP congestion control Congestion avoidance DECbit RED gateways Quality of service
Host Solutions: TCP Congestion Control Host has very little information Assumes best-effort network Acts independently of other hosts Host infers congestion From synchronization feedback e.g. dropped packet timeouts, duplicate ACK’s Loss on wired lines rarely due to transmission error Host acts Reduce transmission rate below congestion threshold Continuously monitor network for signs of congestion
TCP Congestion Control Add notion of congestion window Effective sliding window is smaller of Remote advertised window (flow control) Local congestion window (congestion control) Changes in congestion window size Slow increases to absorb new bandwidth Quick decreases to eliminate congestion
TCP Congestion Control Strategy Self-clocking Send data only when outstanding data ACK’d Equivalent to send window limitation mentioned Growth Add one Maximum Segment Size (MSS) per congestion window of data ACK’d It’s really done this way, at least in Linux: see tcp_cong_avoid in tcp_input.c. Actually, every ack for new data is treated as an MSS ACK’d… any problems with that? Known as additive increase
TCP Congestion Control Strategy Decrease Cut window in half when timeout occurs In practice, set window = window/2 Known as multiplicative decrease Additive Increase, Multiplicative Decrease (AIMD)
TCP Congestion Control AIMD sawtooth trace
TCP Congestion Control AIMD fairness for two competing flows Slope of 1 for additive increase Proportional decrease (towards origin) for multiplicative decrease
Initialization of Congestion Window Congestion window should start small Avoid congestion due to new connections Start at 1 MSS, reset to 1 MSS with each timeout (note that timeouts are coarse-grained, ~1/2 seconds) Known as slow start
Initialization of Congestion Window To make up for slow start, ramp up quickly Maintain threshold window size Use multiplicative increase When congestion window is smaller than threshold Double window for each window ACK’d
Initialization of Congestion Window Threshold value Initially set to maximum window size Set to 1/2 of current window on timeout In practice, increase congestion window by 1 MSS for each ACK of new data (or N bytes for N bytes)
TCP Congestion Control Coarse-grained timeouts lead to idle periods … Solution: fast retransmission Send ACK for each segment received When duplicate ACK’s received Resend lost segment immediately Do not wait for timeout In practice, retransmit on 3rd duplicate Fast recovery When fast retransmission occurs, skip slow start Congestion window becomes 1/2 of the previous Start additive increase immediately
TCP Congestion Window Trace
Congestion Avoidance
Flight Planning for Your Air Travel Planning a vacation for your semester break ? Trying for a trip to scenic Northern Areas No way to go (route is too congested) Delay your program till next semester Flights are FULL Islamabad Airport Peshawer CASE Sakardu
Congestion Avoidance Control vs Avoidance Control: minimize impact of congestion when it occurs Avoidance: avoid producing congestion In terms of operating point limits: