Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks TCP.

Similar presentations


Presentation on theme: "Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks TCP."— Presentation transcript:

1 Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks http://www.cs.princeton.edu/courses/archive/fall14/cos561/ TCP Congestion Control

2 Holding the Internet Together Distributed cooperation for resource allocation –BGP: what end-to-end paths to take (for ~50K ASes) –TCP: what rate to send over each path (for ~3B hosts) 2 AS 1 AS 2 AS 3 AS 4

3 What Problem Does a Protocol Solve? BGP path selection –Select a path that each AS on the path is willing to use –Adapt path selection in the presence of failures TCP congestion control –Prevent congestion collapse of the Internet –Allocate bandwidth fairly and efficiently But, can we be more precise? –Define mathematically what problem is being solved –To understand the problem and analyze the protocol –To predict the effects of changes in the system –To design better protocols from first principles 3

4 Fairness 4

5 Fair and Efficient Use of a Resource Suppose n users share a single resource –Like the bandwidth on a single link –E.g., 3 users sharing a 30 Gbps link What is a fair allocation of bandwidth? –Suppose user demand is “elastic” (i.e., unlimited) –Allocate each a 1/n share (e.g., 10 Gbps each) But, “equality” is not enough –Which allocation is best: [5, 5, 5] or [18, 6, 6]? –[5, 5, 5] is more “fair”, but [18, 6, 6] more efficient –What about [5, 5, 5] vs. [22, 4, 4]? 5

6 Fair Use of a Single Resource What if some users have inelastic demand? –E.g., 3 users where 1 user only wants 6 Gbps –And the total link capacity is 30 Gbps Should we still do an “equal” allocation? –E.g., [6, 6, 6] –But that leaves 12 Gbps unused Should we allocate in proportion to demand? –E.g., 1 user wants 6 Gbps, and 2 each want 20 Gbps –Allocate [4, 13, 13]? Or, give the least demanding user all he wants? –E.g., allocate [6, 12, 12]? 6

7 Max-Min Fairness The allocation must be “feasible” –Total allocation should not exceed link capacity Protect the less fortunate –Any attempt to increase the allocation of one user –… necessarily decreases the allocation of another user with equal or lower allocation Fully utilize a “bottlenecked” resource –If demand exceeds capacity, the link is fully used Progressive filling algorithm –Grow all rates until some users stop having demand –Continue increasing all remaining rates till link is full 7

8 Resource Allocation Over Paths Maximum throughput: [30, 30, 0] –Total throughput of 60, but user C starves Max-min fairness: [15, 15, 15] –Equal allocation, but throughput of just 45 Proportional fairness: [20, 20, 10] –Balance trade-off between throughput and equality –Throughput of 50, and penalize C for using 2 busy links 8 Three users A, B, and C Two 30 Gbps links A B C

9 Distributed Algorithm for Achieving Fairness 9

10 Network Utility Maximization (NUM) Users (i) –Rate allocation: x i –Utility function: U(x i ) Network links (l) –Link capacity: c l –Routes: R li =1 if link l on path i, R li =0 otherwise 10 maximize  i U(x i ) subject to  i R li x i  c l variables x i ≥ 0 xixi U(x i )

11 Network Utility and Fairness 11 x U(x) concave (diminishing returns) Alpha-fair utility –U(x) = x 1-  /(1-  ) for  ≠ 1 –U(x) = log(x) for  small  (more elastic demand) large  (more fair) ∞  Max throughput Proportional fairness Max-min fairness

12 Solving NUM Problems Convex optimization –Maximizing a concave objective –Subject to convex constraints Benefits –Locally optimal solution is globally optimal –Can be solved efficiently on a centralized computer “Decomposable” into many smaller problems 12 maximize  i U(x i ) subject to  i R li x i  c l variables x i ≥ 0

13 Move Constraints to Objective 13 max  i U(x i ) subject to  i R li x i  c l variables x i ≥ 0 max  i U(x i ) +  l p l (c l –  i in S(l)  x i ) decoupled across sessions coupled across sessions max  i [U(x i ) – (  l in L(i)  p l ) x i ] +  l p l c l decoupled across sessions decoupled across links

14 Decomposition 14 User i Link l path cost q i =  p l offered link load y l =  R li x i max (U(x i ) – q i ) xixi p l [t] = (p l [t-1] -  (c l – y l )) + rates x i prices p l

15 Link Prices and Implicit Feedback What are the link prices p l ? –Measure of congestion –Amount of traffic in excess of capacity –That is, the packet loss! What are the path costs q i ? –Sum of the link prices p l along the path –If loss is low, sum of link loss is roughly path loss No need for explicit feedback! –User i can observe the path loss q i on path i –Link l can observe the offered load y l on link l 15

16 Coming Back to TCP Reverse engineering –TCP Reno  Utilities are arctan(x)  Prices are end-to-end packet loss –TCP Vegas  Utilities are log(x), i.e., proportional fairness  Prices are end-to-end packet delays Forward engineering –Use decomposition to design new variants of TCP –E.g., TCP FAST Simplifications –Fixed set of connections, focus on equilibrium behavior, ignore feedback delays and queuing dynamics 16

17 TCP Congestion Control 17

18 Detecting and Reacting to Loss Detecting packet loss –Timeout –Triple duplicate ACK Reacting to loss –Retransmit the lost packet –Decrease the congestion window (how much?) Reacting to non-loss –Increase the congestion window (how much?) Additive increase, multiplicative decrease 18

19 TCP Tahoe vs. TCP Reno Two similar versions of TCP –TCP Tahoe (SIGCOMM’88 paper) –TCP Reno (1990) TCP Tahoe –Always repeat slow start after a loss –Assign slow-start threshold to half of congestion window TCP Reno –Repeat slow start after timeout-based loss –Divide congestion window in half after triple dup ACK 19

20 TCP Sawtooth Behavior 20 t Congestion Window timeout triple dup ACK

21 Discussion 21


Download ppt "Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks TCP."

Similar presentations


Ads by Google