Download presentation
Presentation is loading. Please wait.
1
Lecture 8 Congestion Control EECS 122 University of California Berkeley
2
EECS 122Walrand2 TOCTOC: Congestion Control The Problem Questions Approaches TCP: Algorithm TCP Refinements Summary
3
EECS 122Walrand3 Congestion ControlCongestion Control: The Problem Flows share links: How to share the links bandwidth?
4
EECS 122Walrand4 Congestion ControlCongestion Control: Questions What should be the ideal sharing? Does it matter? Does it matter Discovering available bandwidth What is fair? What is fair
5
EECS 122Walrand5 QuestionsQuestions: Does it matter? Congestion occurs Access link Slow link (56k, DSL, T1, wireless, …) Access network E.g., behind the DSLAM Can improve treatment of flows E.g., one flow should not get a much smaller fraction of bandwidth Some flows might need some guaranteed bandwidth
6
EECS 122Walrand6 QuestionsQuestions: Available bandwidth? Example: = router = host 3 = link with bandwidth of 3Mbps (same for 6 and 10) x, y, z = throughput of flows
7
EECS 122Walrand7 QuestionsQuestions: Available bandwidth? Example: Assume C D with rate y and E F with rate z How does A “discover” the available bandwidth to B? Some approaches: 1.ReservationReservation 2.Adapt to congestionAdapt 3.Test for sufficient bandwidthTest 4.Pricing congestionPricing
8
EECS 122Walrand8 QuestionsQuestions: Available bandwidth? Example: Assume C D with rate y and E F with rate z How does A “discover” the available bandwidth to B? Some approaches: 1.ReservationReservation 2.Adapt to congestionAdapt 3.Test for sufficient bandwidthTest 4.Pricing congestionPricing
9
EECS 122Walrand9 Available bandwidthAvailable bandwidth: Reservation 1.Routers (or manager) keep track of reserved rates 2.A requests a rate R to B from the network 3.The network figures out if R is available 4.If R is available, routers (or manager) update reservations and confirm to A 5.Note: Complex, Slow, Requires enforcement, Renegotiations, Pricing
10
EECS 122Walrand10 Available bandwidthAvailable bandwidth: Adapt 1.Transmit and slow down if congestion occur 2.Example: Initially: x= 0, y = 3, z = 3 Then A increases its rate; C and E notice congestion and slow down Later, C stops: A and E increase rates 3.Notes: No guarantees: throughput may drop Key question: how to adapt rates
11
EECS 122Walrand11 Available bandwidthAvailable bandwidth: Test 1.Assume flows require at most 1Mbps (e.g., video) 2.Routers monitor their rates to see if they have at least 1 Mbps of available bandwidth; they mark packets otherwise 3.If A wants a new flow to B, it sends test packets to B 4.If routers do not mark test packets, then A can start its new flow; otherwise, A does not start it 5.Advantages: 1.relatively simple 2.guarantee
12
EECS 122Walrand12 Available bandwidthAvailable bandwidth: Pricing Example: When they get saturated, routers mark packets If a flow with rate R uses saturated links, it gets marks with rate R Each mark costs one unit Source slows down if price becomes excessive x= 1+, y = 2+, z = 2+ pA = 1 + 1; pC = pE = 2 x = 2+, y = 1+, z = 1+ pA = 2 + 2; pC = pE = 1
13
EECS 122Walrand13 QuestionsQuestions: What is Fair? Example: x = y = z = 1.5: fair in max-min sense x = 0, y = z = 3: maximizes x + y + z 5x = 4y = 4z: equalizes resources flows use with x = 1.33, y = z = 1.67 What if A B needs 2Mbps? (and is willing to pay for it)
14
EECS 122Walrand14 Congestion ControlCongestion Control: Approaches Telephone Network: Reservation Transmission Control Protocol (TCP) Adapt rate to congestion Algorithm for adaptation attempts to be fair … User Datagram Protocol (UDP) Transmit and hope for the best Various proposals for Internet: Reservation Pricing Test Note: Either by hosts or between domains
15
EECS 122Walrand15 Congestion ControlCongestion Control: TCP Algorithm Principles Example Multiple Sources A Bad AlgorithmA Bad Algorithm: AIAD AIMD: Additive Increase – Multiplicative Decrease Why AIAD Fails
16
EECS 122Walrand16 TCP AlgorithmTCP Algorithm: Principles We focus on the “standard” TCP (reno) Idea: Not congested => increase rate Congested => slow down Questions: How to detect congestion? Missing ACKs How to increase/slow down? AIMD
17
EECS 122Walrand17 TCP AlgorithmTCP Algorithm: Example No congestion x increases by one packet/RTT every RTT Congestion decrease x by factor 2 AB x C = 50 pkts/RTT
18
EECS 122Walrand18 TCP AlgorithmTCP Algorithm: Multiple Sources AB x C = 50 pkts/RTT DE No congestion rate increases by one packet/RTT every RTT Congestion decrease rate by factor 2 Rates equalize fair share y
19
EECS 122Walrand19 TCP AlgorithmTCP Algorithm: Bad Algorithm AB x C = 50 pkts/RTT DE No congestion x increases by one packet/RTT every RTT Congestion decrease x by 1 y
20
EECS 122Walrand20 TCP AlgorithmTCP Algorithm: AIMD AB x C DE y Limit rates: x = y
21
EECS 122Walrand21 TCP AlgorithmTCP Algorithm: Why AIAD Fails AB x C DE y Limit rates: x and y depend on initial values
22
EECS 122Walrand22 Congestion ControlCongestion Control: TCP Refinements Fast Retransmit Fast RecoveryFast Recovery: 1 st Look Fast RecoveryFast Recovery: 2 nd Look Slow Start Window Updates Flow Control Summary
23
EECS 122Walrand23 RefinementsRefinements: Fast Retransmit n n+1 n+2 Cumulative ACKs: ACK # = next expected # n+1 n+3 n+1 3 rd duplicated ACK: likely packet loss retransmit n+1 timeout
24
EECS 122Walrand24 Refinements Refinements : Fast Recovery (1) Timeout Reset Window = 1 unit (MSS) 3 rd Dup ACK Window/2 Window Slope = 1 MSS/RTT 3 rd Dup ACK n n/2 Timeout 1 Moderate congestion (subsequent pkts arrived) Severe congestion
25
EECS 122Walrand25 Refinements Refinements : Fast Recovery (2) Window adjustment is tricky: Want W W/2 1 n ssthresh = W/2 W = ssthresh + 3 W = W + 1 at each Dup Ack n - 3 W = n + W/2 W/2 outstanding packets: n+1, …, n+W/2 W/2 outstanding packets: n+1, …, n+W/2 W W = ssthresh
26
EECS 122Walrand26 Refinements Refinements : Slow Start Objective: Discover available bdw fast Solution: Exponential increase of window W Timeout 1 n n/2 Threshold 65KB exp Additive Slope = 1/RTT
27
EECS 122Walrand27 Refinements Refinements : Window Updates Exponential: W = W + 1 at each ACK: W = 1W = 2W = 4W = 8 Additive: W = W + 1/W at each ACK: W = 8 + 1/8 W = 8.125 + 1/8.125 8 + 2/8 W 8 + 8/8 = 9 W 9 + 9/9 = 10
28
EECS 122Walrand28 Refinements Refinements : Flow Control Objective: Avoid saturating destination Algorithm: Receiver avertizes window RAW RAW window = min{RAW – OUT, W} where OUT = Oustanding = Last sent – last ACKed W = Cong. Window from AIMD + refinements [ACK | RAW | …]
29
EECS 122Walrand29 Refinements Refinements : Summary W 1 65KB Actual window = min{RAW - OUT, W} X 0.5 TO 3DA X 0.5 3DA TO X 0.5 SSCA SS CA 3 3
30
EECS 122Walrand30 Congestion ControlCongestion Control: Summary Slow Start: Discover available bandwidth Congestion Avoidance: AIMD Tries to be fair Refinements: Fast Retransmit: 3DA Fast Recovery: Reset W to W/2 (instead of W = 1) [More precisely: ssthresh = W/2, W = W + 1 per DA, W = ssthresh when get new ACK.] TO: set ssthresh = W/2, W = 1, SS until W = ssthresh, then CA Timers: Timeout = Average + 4 Deviations If time out Timeout x 2 Reset after new packet or new ACK Flow Control: Window = min{RAW – OUT, W}
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.