Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Network Transport Layer: TCP Analysis and BW Allocation Framework Y. Richard Yang 3/30/2016.

Similar presentations


Presentation on theme: "1 Network Transport Layer: TCP Analysis and BW Allocation Framework Y. Richard Yang 3/30/2016."— Presentation transcript:

1 1 Network Transport Layer: TCP Analysis and BW Allocation Framework Y. Richard Yang http://zoo.cs.yale.edu/classes/cs433/ 3/30/2016

2 Admin. r Programming assignment 3 perf benchmarking m If your Zooput is above 100 Mbps, you are invited to attend in person an eval using 40Gbps servers after Monday class r Programming assignment 4 design review m Friday 1:30 – 4:30 pm m Sunday 2 – 4:00 pm, 6-8 pm r Exam 1 (Monday next week) m See class page for samples from past 2

3 3 A Summary of Questions  Basic structure: sliding window protocols r How to determine the “right” parameters? o Timeout o mean + variation o Sliding window size o Goals: distributed adjust window size to achieve fairness and efficiency o Linear control parameter: AMI/MD (questions to think about: Do we need more complex control rules?)

4 4 TCP/Reno Implementation Initially: cwnd = 1; ssthresh = infinite (e.g., 64K); For each newly ACKed segment: if (cwnd < ssthresh) // slow start: MI cwnd = cwnd + 1; else // congestion avoidance; AI cwnd += 1/cwnd; Triple-duplicate ACKs: // MD cwnd = ssthresh = cwnd/2; Timeout: ssthresh = cwnd/2; // reset cwnd = 1; (if already timed out, double timeout value; this is called exponential backoff)

5 5 TCP/Reno: Big Picture Time cwnd slow start congestion avoidance TD TD: Triple duplicate acknowledgements TO: Timeout TO ssthresh congestion avoidance TD congestion avoidance slow start congestion avoidance TD

6 6 A Session Question: when cwnd fluctuates widely (i.e., cut to half), why the sending rate does not?

7 7 TCP/Reno Queueing Dynamics r Consider congestion avoidance only Time cwnd congestion avoidance TD ssthresh bottleneck bandwidth filling buffer draining buffer There is a filling and draining of buffer process for each TCP flow. The buffer at the bottleneck keeps pace, as long as it is large enough.

8 Outline r Recap  Transport congestion control  what is congestion  the AIMD alg o TCP/reno congestion control o TCP/reno  TCP/reno throughput analysis

9 9 Objective r To understand the throughput of TCP/Reno as a function of RTT (RTT), loss rate (p) and packet size r We will derive the formula twice, using two setups using two different approaches

10 10 TCP/Reno Throughput Modeling r Given mean packet loss rate p, mean round- trip time RTT, packet size S r Consider only the congestion avoidance mode (long flows such as large files) r Assume no timeout r Assume mean window size is W m segments, each with S bytes sent in one RTT: Throughput = W m * S RTT bytes/sec

11 Outline r Recap  Transport congestion control  what is congestion  the AIMD alg o TCP/reno congestion control o TCP/reno  TCP/reno throughput analysis  analysis 1: deterministic

12 12 TCP/Reno Throughput Modeling: Relating W with Loss Rate p r Consider congestion avoidance only Time cwnd congestion avoidance TD ssthresh Assume one packet loss (loss event) per cycle Total packets sent per cycle = (W/2 + W)/2 * W/2 = 3W 2 /8 Thus p = 1/( 3W 2 /8) = 8/(3W 2 ) available bandwidth W/2 W

13 Outline r Recap  Transport congestion control  what is congestion  the AIMD alg o TCP/reno congestion control o TCP/reno  TCP/reno throughput analysis  analysis 1: deterministic  analysis 2: random loss

14 14 TCP/Reno Throughput Modeling => tcp-tput-formula.xlsx

15 Summary: TCP/Reno Throughput Modeling r They are all approximate modeling m the details and the exact numbers are not important m the objective is to help us understand TCP better 15

16 Problem of TCP/Reno Behavior 16 Time cwnd TD ssthresh bottleneck bandwidth

17 Outline r Recap  Transport congestion control  what is congestion  the AIMD alg o TCP/reno congestion control o TCP/reno o TCP/reno throughput analysis  TCP/Vegas

18 18 TCP/Vegas (Brakmo & Peterson 1994) SS time window CA r Idea: try to detect congestion by delay before loss r Objective: not to overflow the buffer; instead, try to maintain a constant number of packets in the bottleneck queue

19 19 TCP/Vegas: Key Question r How to estimate the number of packets queued in the bottleneck queue? SS time window CA

20 20 Recall: Little’s Law r For any system with no or (low) loss. r Assume m mean arrival rate X, mean service time T, and mean number of requests in the system W r Then relationship between W, X, and T: T, W X

21 Estimating Number of Packets in the Queue 21

22 22 TCP/Vegas CA algorithm T = T prop + T queueing Applying Little’s Law: x vegas T = x vegas T prop + x vegas T queueing, where x vegas = W / T is the sending rate Then number of packets in the queue is x vegas T queueing = x vegas T - x vegas T prop = W – W/T T prop

23 23 queue size for every RTT { if W – W/RTT RTT min <  then W ++ if W – W/RTT RTT min >  then W -- } for every loss W := W/2 TCP/Vegas CA algorithm SS time window CA maintain a constant number of packets in the bottleneck buffer

24 24 TCP/Vegas Dynamics

25 25 TCP/Reno vs. TCP/Vegas TCP/RenoTCP/Vegas Congestion signal Dynamics Equilibrium loss rate p queueying delay T queueing Discussion: Why and why not TCP/Vegas?

26 Outline r Recap  Transport congestion control  what is congestion  the AIMD alg o TCP/reno congestion control o TCP/reno o TCP/reno throughput analysis o TCP/Vegas  A unifying view of TCP/Reno TCP/Vegas

27 27 A Unifying Congestion Measure View r Both TCP/reno and TCP/Vegas react to congestion measure (loss/delay), which is a signal from the network to the flows reflecting congestion r Another way to think of a congestion measure is to think of it as “price” m price goes up as the rate to a link is getting close to capacity m the higher the “price”, the lower the rate

28 28 Interpreting Congestion Measure x f (t) q l (t) q 2 (t) TCP/Reno: TCP/Vegas:

29 Outline r Recap  Transport congestion control  what is congestion  the AIMD alg o TCP/reno congestion control o TCP/reno o TCP/reno throughput analysis o TCP/Vegas o A unifying view of TCP/Reno TCP/Vegas  Network wide resource allocation

30 30 Motivation r So far our discussion is implicitly on a network with a single bottleneck link; this simplifies design and analysis: m efficiency/optimality (high utilization) fully utilize the bandwidth of the link m fairness (resource sharing) each flow receives an equal share of the link’s bandwidth

31 31 Network Resource Allocation r It is important to understand and design protocols for a general network topology m how will TCP allocate resource in a general topology? m how should resource be allocated in a general topology?

32 32 Example: TCP/Reno Rates x1x1 x2x2 x3x3 Rate: x 1 = 0.26 x 2 = x 3 = 0.74 C= 1

33 33 Example: TCP/Vegas Rates x1x1 x2x2 x3x3 Rates : x 1 = 1/3 x 2 = x 3 = 2/3 C= 1

34 34 Example: Maximize Throughput x1x1 x2x2 x3x3 Optimal: x 1 = 0 x 2 = x 3 = 1 C= 1

35 Example: Max-min Fairness r Max-min fairness: maximizes the throughput of the flow receiving the minimum (of resources) Justification: John Rawls, A Theory of Justice (1971) http://en.wikipedia.org/wiki/John_Rawls This is a resource allocation scheme used in ATM and some other network resource allocation proposals

36 36 Example: Max-Min x1x1 x2x2 x3x3 Rates: x 1 = x 2 = x 3 = 1/2 C= 1

37 37 Network Resource Allocation Using Utility Functions r A set of flows F r If x f is the rate of flow f, then the utility to flow f is U f (x f ), where U f (x f ) is a concave utility function. r Maximize aggregate utility, subject to capacity constraints

38 38 Example: Proportional Fairness x1x1 x2x2 x3x3 Optimal: x 1 = 1/3 x 2 = x 3 = 2/3 C= 1

39 39 Example 3: a Utility Function x1x1 x2x2 x3x3 Optimal: x 1 = 0.26 x 2 = x 3 = 0.74 C= 1

40 Summary: Allocations ObjectiveAllocation (x1, x2, x3) TCP/Reno0.260.74 TCP/Vegas1/32/3 Max Throughput011 Max-min½½½ Max sum log(x)1/32/3 Max sum of -1/(RTT 2 x)0.260.74 40 x1x1 x2x2 x3x3 C= 1

41 Questions r Engineering: m Design objective function m Design distributed alg to achieve objective r Science/reverse engineering: what do TCP/Reno, TCP/Vegas achieve? 41 ObjectiveAllocation (x1, x2, x3) TCP/Reno0.260.74 TCP/Vegas1/32/3 Max throughput011 Max-min½½½ Max sum log(x)1/32/3 Max sum of -1/(RTT 2 x)0.260.74

42 Outline r Recap  Transport congestion control  what is congestion  the AIMD alg o TCP/reno congestion control o TCP/reno o TCP/reno throughput analysis o TCP/Vegas o A unifying view of TCP/Reno TCP/Vegas o Network wide resource allocation o Framework  Axiom derivation of network-wide objective function

43 43 Network Bandwidth Allocation Using Nash Bargain Solution (NBS) r High level picture m given the feasible set of bandwidth allocation, we want to pick an allocation point that is efficient and fair r The determination of the allocation point should be based on “first principles” (axioms)

44 44 Network Bandwidth Allocation: Feasible Region x1x1 x2x2 x3x3 C= 1 x1x1 x3x3 x2x2

45 45 Nash Bargain Solution (NBS) R s x1x1 x2x2 r Assume a finite convex feasible set r Axioms

46 46 Nash Bargain Solution (NBS) r R T s x1x1 x2x2

47 47 Nash Bargain Solution (NBS) r Surprising result by John Nash (1951) m the rate allocation point is the feasible point which maximizes r This is equivalent to maximize r In other words, assume each flow f has utility function log(x f ) r I will give a proof for F = 2 m think about F > 2 R x1x1 x2x2

48 48 Nash Bargain Solution s x1 * x2 r Assume s is the feasible point which maximizes x1 * x2 r Scale the feasible set so that s is at (1, 1) x2x2 x1x1 1 1

49 49 Nash Bargain Solution x1 = x2 s x1 + x2 = 2 x1 * x2 = 1 Question: after the transformation, is there any feasible point with x1 + x2 > 2, i.e., is s still the point maximizing x1*x2)? P Q x1x1 x2x2 R 1 1

50 50 Nash Bargain Solution x1 = x2 s x1 + x2 = 2 x1 * x2 = 1 r Consider the symmetric rectangle U containing the original feasible set -> According to symmetry and Pareto, s is the allocation when feasible set is U r According to independence of irrelevant alternatives, the allocation of R is s as well. x1x1 x2x2 R 1 1 U

51 51  Allocation is proportionally fair if for any other allocation, aggregate of proportional changes is non-positive, e.g. if x f is a proportional-fair allocation, and y f is any other feasible allocation, then require


Download ppt "1 Network Transport Layer: TCP Analysis and BW Allocation Framework Y. Richard Yang 3/30/2016."

Similar presentations


Ads by Google