Download presentation
Presentation is loading. Please wait.
Published byMerilyn Rogers Modified over 9 years ago
1
Winter 2003CS244a Handout 71 CS492B Project #2 TCP Tutorial #2 2003. 9.22 Jin Hyun Ju
2
Winter 2003CS244a Handout 72 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu http://www.stanford.edu/~nickm
3
Winter 2003CS244a Handout 73 Main points Congestion is inevitable TCP sources detect congestion and, co-operatively, reduce the rate at which they transmit. The rate is controlled using the TCP window size. TCP modifies the rate according to “Additive Increase, Multiplicative Decrease (AIMD)”. To jump start flows, TCP uses a fast restart mechanism (called “slow start”!).
4
Winter 2003CS244a Handout 74 Congestion H1H1 H2H2 R1 H3H3 A 1 (t) 10Mb/s D(t) 1.5Mb/s A 2 (t) 100Mb/s A1(t)A1(t) A2(t)A2(t) X(t)X(t) D(t)D(t) A1(t)A1(t) A2(t)A2(t) D(t)D(t) X(t)X(t) Cumulative bytes t
5
Winter 2003CS244a Handout 75 Congestion is unavoidable Arguably it’s good! We use packet switching because it makes efficient use of the links. Therefore, buffers in the routers are frequently occupied. If buffers are always empty, delay is low, but our usage of the network is low. If buffers are always occupied, delay is high, but we are using the network more efficiently. So how much congestion is too much?
6
Winter 2003CS244a Handout 76 Detecting Congestion duplicated ACK time out without congestion control…
7
Winter 2003CS244a Handout 77 TCP Congestion Control TCP implements host-based, feedback- based, window-based congestion control. TCP sources attempts to determine how much capacity is available TCP sends packets, then reacts to observable events (loss).
8
Winter 2003CS244a Handout 78 TCP Congestion Control TCP sources change the sending rate by modifying the window size: Window = min{Advertized window, Congestion Window} In other words, send at the rate of the slowest component: network or receiver. “cwnd” follows additive increase/multiplicative decrease On receipt of Ack: cwnd += 1 On packet loss (timeout): cwnd *= 0.5 ReceiverTransmitter (“cwnd”)
9
Winter 2003CS244a Handout 79 Additive Increase D A DDAADDAADA Src Dest When ACK is received: cwnd += 1/cwnd
10
Winter 2003CS244a Handout 710 Leads to the TCP “sawtooth” t Rate halved Timeouts Could take a long time to get started!
11
Winter 2003CS244a Handout 711 “Slow Start” Designed to cold-start connection quickly at startup or if a connection has been halted (e.g. window dropped to zero, or window full, but ACK is lost). How it works: increase cwnd by 1 for each ACK received. D A DDAADD AA D A Src Dest D A 1 2 4 8
12
Winter 2003CS244a Handout 712 Fast Recovery Upon 3 duplicate ACKs, TCP retransmits. Does not enter slow-start: there are probably ACKs in the pipe that will continue correct AIMD operation.
13
Winter 2003CS244a Handout 713 TCP Reno Congestion Control halved Timeout Exponential “slow start” t Rate Why is it called slow-start? Because TCP originally had no congestion control mechanism. The source would just start by sending a whole window’s worth of data. Slow start in operation until it reaches half of previous cwnd. Triple duplicated ACK
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.