15-744: Computer Networking L-5 TCP & Routers. 2 Fair Queuing Core-stateless Fair queuing Assigned reading [DKS90] Analysis and Simulation of a Fair Queueing.

Slides:



Advertisements
Similar presentations
Fair Queueing. Design space Buffer management: –RED, Drop-Tail, etc. Scheduling: which flow to service at a given time –FIFO –Fair Queueing.
Advertisements

Computer Networking Lecture 20 – Queue Management and QoS.
Congestion Control Reasons: - too many packets in the network and not enough buffer space S = rate at which packets are generated R = rate at which receivers.
ECE 4450:427/527 - Computer Networks Spring 2015
CS 268: Lecture 8 Router Support for Congestion Control Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
CS 4700 / CS 5700 Network Fundamentals Lecture 12: Router-Aided Congestion Control (Drop it like it’s hot) Revised 3/18/13.
Router Buffer Sizing and Reliability Challenges in Multicast Aditya Akella 02/28.
Advanced Computer Networking Congestion Control for High Bandwidth-Delay Product Environments (XCP Algorithm) 1.
XCP: Congestion Control for High Bandwidth-Delay Product Network Dina Katabi, Mark Handley and Charlie Rohrs Presented by Ao-Jan Su.
Sizing Router Buffers Guido Appenzeller Isaac Keslassy Nick McKeown Stanford University.
Analysis and Simulation of a Fair Queuing Algorithm
High speed TCP’s. Why high-speed TCP? Suppose that the bottleneck bandwidth is 10Gbps and RTT = 200ms. Bandwidth delay product is packets (1500.
EE689 Lecture 5 Review of last lecture More on HPF RED.
Sizing Router Buffers (Summary)
Sizing Router Buffers Nick McKeown Guido Appenzeller & Isaac Keslassy SNRC Review May 27 th, 2004.
TCP Congestion Control TCP sources change the sending rate by modifying the window size: Window = min {Advertised window, Congestion Window} In other words,
Congestion Control and Resource Allocation
CS 268: Lecture 8 (Router Support for Congestion Control) Ion Stoica February 19, 2002.
Computer Networking Lecture 19 – TCP Performance.
Reducing the Buffer Size in Backbone Routers Yashar Ganjali High Performance Networking Group Stanford University February 23, 2005
Isaac Keslassy (Technion) Guido Appenzeller & Nick McKeown (Stanford)
Computer Networking Lecture 17 – Queue Management As usual: Thanks to Srini Seshan and Dave Anderson.
Lecture 5: Congestion Control l Challenge: how do we efficiently share network resources among billions of hosts? n Last time: TCP n This time: Alternative.
Core Stateless Fair Queueing Stoica, Shanker and Zhang - SIGCOMM 98 Rigorous fair Queueing requires per flow state: too costly in high speed core routers.
Core Stateless Fair Queueing Stoica, Shanker and Zhang - SIGCOMM 98 Fair Queueing requires per flow state: too costly in high speed core routers Yet, some.
15-744: Computer Networking L-5 Fair Queuing. 2 Fair Queuing Core-stateless Fair queuing Assigned reading [DKS90] Analysis and Simulation of a Fair Queueing.
CS144 An Introduction to Computer Networks
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
1 Queue Management Hamed Khanmirza Principles of Networking University of Tehran.
CONGESTION CONTROL and RESOURCE ALLOCATION. Definition Resource Allocation : Process by which network elements try to meet the competing demands that.
Advance Computer Networking L-5 TCP & Routers Acknowledgments: Lecture slides are from the graduate level Computer Networks course thought by Srinivasan.
CS 268: Computer Networking L-5 Router Queue Management.
CS 268: Computer Networking L-6 Router Congestion Control.
Advance Computer Networking L-6 TCP & Routers Acknowledgments: Lecture slides are from the graduate level Computer Networks course thought by Srinivasan.
Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr.
March 29 Scheduling ?. What is Packet Scheduling? Decide when and what packet to send on output link 1 2 Scheduler flow 1 flow 2 flow n Buffer management.
Queueing and Active Queue Management Aditya Akella 02/26/2007.
9.7 Other Congestion Related Issues Outline Queuing Discipline Avoiding Congestion.
Packet Scheduling and Buffer Management Switches S.Keshav: “ An Engineering Approach to Networking”
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
Lecture 9 – More TCP & Congestion Control
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Principles of Congestion Control Some slides.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks TCP.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 18: Quality of Service Slides used with.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Real-Time Networks – WAN Packet Scheduling.
Scheduling Determines which packet gets the resource. Enforces resource allocation to each flows. To be “Fair”, scheduling must: –Keep track of how many.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Weighted Fair Queuing Some slides used with.
Random Early Detection (RED) Router notifies source before congestion happens - just drop the packet (TCP will timeout and adjust its window) - could make.
1 Fair Queuing Hamed Khanmirza Principles of Network University of Tehran.
Queue Scheduling Disciplines
Spring Computer Networks1 Congestion Control Sections 6.1 – 6.4 Outline Preliminaries Queuing Discipline Reacting to Congestion Avoiding Congestion.
15-744: Computer Networking L-5 TCP & Routers. 2 Fair Queuing Core-stateless Fair queuing Assigned reading [DKS90] Analysis and Simulation of a Fair Queueing.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
CS 268: Computer Networking
EE 122: Router Support for Congestion Control: RED and Fair Queueing
TCP, XCP and Fair Queueing
Lecture 19 – TCP Performance
Queuing and Queue Management
ECE 4450:427/527 - Computer Networks Spring 2017
15-744: Computer Networking
Advance Computer Networking
CS640: Introduction to Computer Networks
Advance Computer Networking
15-744: Computer Networking
Congestion Control Reasons:
15-744: Computer Networking
Transport Layer: Congestion Control
Presentation transcript:

15-744: Computer Networking L-5 TCP & Routers

2 Fair Queuing Core-stateless Fair queuing Assigned reading [DKS90] Analysis and Simulation of a Fair Queueing Algorithm, Internetworking: Research and Experience [SSZ98] Core-Stateless Fair Queueing: Achieving Approximately Fair Allocations in High Speed Networks

3 Overview TCP modeling Fairness Fair-queuing Core-stateless FQ

4 TCP Modeling Given the congestion behavior of TCP can we predict what type of performance we should get? What are the important factors Loss rate Affects how often window is reduced RTT Affects increase rate and relates BW to window RTO Affects performance during loss recovery MSS Affects increase rate

5 Overall TCP Behavior Time Window Let’s concentrate on steady state behavior with no timeouts and perfect loss recovery

6 Simple TCP Model Some additional assumptions Fixed RTT No delayed ACKs In steady state, TCP losses packet each time window reaches W packets Window drops to W/2 packets Each RTT window increases by 1 packet  W/2 * RTT before next loss BW = MSS * avg window/RTT = MSS * (W + W/2)/(2 * RTT).75 * MSS * W / RTT

7 Simple Loss Model What was the loss rate? Packets transferred between losses = Avg BW * time = (.75 W/RTT) * (W/2 * RTT) = 3W 2 /8 1 packet lost  loss rate = p = 8/3W 2 W = sqrt( 8 / (3 * loss rate)) BW =.75 * MSS * W / RTT BW = MSS / (RTT * sqrt (2/3p))

8 TCP Friendliness What does it mean to be TCP friendly? TCP is not going away Any new congestion control must compete with TCP flows Should not clobber TCP flows and grab bulk of link Should also be able to hold its own, i.e. grab its fair share, or it will never become popular How is this quantified/shown? Has evolved into evaluating loss/throughput behavior If it shows 1/sqrt(p) behavior it is ok But is this really true?

9 TCP Performance Can TCP saturate a link? Congestion control Increase utilization until… link becomes congested React by decreasing window by 50% Window is proportional to rate * RTT Doesn’t this mean that the network oscillates between 50 and 100% utilization? Average utilization = 75%?? No…this is *not* right!

10 TCP Congestion Control Only W packets may be outstanding Rule for adjusting W If an ACK is received: W ← W+1/W If a packet is lost:W ← W/2 SourceDest t Window size

11 Single TCP Flow Router without buffers

12 Summary Unbuffered Link t W Minimum window for full utilization The router can’t fully utilize the link If the window is too small, link is not full If the link is full, next window increase causes drop With no buffer it still achieves 75% utilization

13 TCP Performance In the real world, router queues play important role Window is proportional to rate * RTT But, RTT changes as well the window Window to fill links = propagation RTT * bottleneck bandwidth If window is larger, packets sit in queue on bottleneck link

14 TCP Performance If we have a large router queue  can get 100% utilization100% utilization But, router queues can cause large delays How big does the queue need to be? Windows vary from W  W/2 Must make sure that link is always full W/2 > RTT * BW W = RTT * BW + Qsize Therefore, Qsize > RTT * BW Ensures 100% utilization Delay? Varies between RTT and 2 * RTT

15 Single TCP Flow Router with large enough buffers for full link utilization

16 Summary Buffered Link t W Minimum window for full utilization With sufficient buffering we achieve full link utilization The window is always above the critical threshold Buffer absorbs changes in window size Buffer Size = Height of TCP Sawtooth Minimum buffer size needed is 2T*C This is the origin of the rule-of-thumb Buffer

17 Example 10Gb/s linecard Requires 300Mbytes of buffering. Read and write 40 byte packet every 32ns. Memory technologies DRAM: require 4 devices, but too slow. SRAM: require 80 devices, 1kW, $2000. Problem gets harder at 40Gb/s Hence RLDRAM, FCRAM, etc.

18 Rule-of-thumb Rule-of-thumb makes sense for one flow Typical backbone link has > 20,000 flows Does the rule-of-thumb still hold?

19 If flows are synchronized Aggregate window has same dynamics Therefore buffer occupancy has same dynamics Rule-of-thumb still holds. t

20 If flows are not synchronized Probability Distribution B 0 Buffer Size

21 Central Limit Theorem CLT tells us that the more variables (Congestion Windows of Flows) we have, the narrower the Gaussian (Fluctuation of sum of windows) Width of Gaussian decreases with Buffer size should also decreases with

22 Required buffer size Simulation

23 Overview TCP modeling Fairness Fair-queuing Core-stateless FQ

24 Fairness Goals Allocate resources fairly Isolate ill-behaved users Router does not send explicit feedback to source Still needs e2e congestion control Still achieve statistical muxing One flow can fill entire pipe if no contenders Work conserving  scheduler never idles link if it has a packet

25 What is Fairness? At what granularity? Flows, connections, domains? What if users have different RTTs/links/etc. Should it share a link fairly or be TCP fair? Maximize fairness index? Fairness = (  x i ) 2 /n(  x i 2 ) 0<fairness<1 Basically a tough question to answer – typically design mechanisms instead of policy User = arbitrary granularity

26 Max-min Fairness Allocate user with “small” demand what it wants, evenly divide unused resources to “big” users Formally: Resources allocated in terms of increasing demand No source gets resource share larger than its demand Sources with unsatisfied demands get equal share of resource

27 Max-min Fairness Example Assume sources 1..n, with resource demands X1..Xn in ascending order Assume channel capacity C. Give C/n to X1; if this is more than X1 wants, divide excess (C/n - X1) to other sources: each gets C/n + (C/n - X1)/(n-1) If this is larger than what X2 wants, repeat process

28 Implementing max-min Fairness Generalized processor sharing Fluid fairness Bitwise round robin among all queues Why not simple round robin? Variable packet length  can get more service by sending bigger packets Unfair instantaneous service rate What if arrive just before/after packet departs?

29 Bit-by-bit RR Single flow: clock ticks when a bit is transmitted. For packet i: P i = length, A i = arrival time, S i = begin transmit time, F i = finish transmit time F i = S i +P i = max (F i-1, A i ) + P i Multiple flows: clock ticks when a bit from all active flows is transmitted  round number Can calculate F i for each packet if number of flows is know at all times This can be complicated

30 Bit-by-bit RR Illustration Not feasible to interleave bits on real networks FQ simulates bit-by- bit RR

31 Overview TCP modeling Fairness Fair-queuing Core-stateless FQ

32 Fair Queuing Mapping bit-by-bit schedule onto packet transmission schedule Transmit packet with the lowest F i at any given time How do you compute F i ?

33 FQ Illustration Flow 1 Flow 2 Flow n I/P O/P Variation: Weighted Fair Queuing (WFQ)

34 Bit-by-bit RR Example F=10 Flow 1 (arriving) Flow 2 transmitting Output F=2 F=5 F=8 Flow 1Flow 2 Output F=10 Cannot preempt packet currently being transmitted

35 Delay Allocation Reduce delay for flows using less than fair share Advance finish times for sources whose queues drain temporarily Schedule based on B i instead of F i F i = P i + max (F i-1, A i )  B i = P i + max (F i-1, A i -  ) If A i < F i-1, conversation is active and  has no effect If A i > F i-1, conversation is inactive and  determines how much history to take into account Infrequent senders do better when history is used

36 Fair Queuing Tradeoffs FQ can control congestion by monitoring flows Non-adaptive flows can still be a problem – why? Complex state Must keep queue per flow Hard in routers with many flows (e.g., backbone routers) Flow aggregation is a possibility (e.g. do fairness per domain) Complex computation Classification into flows may be hard Must keep queues sorted by finish times Finish times change whenever the flow count changes

Discussion Comments Granularity of fairness Mechanism vs. policy  will see this in QoS Hard to understand Complexity – how bad is it? 37

38 Overview TCP modeling Fairness Fair-queuing Core-stateless FQ

39 Core-Stateless Fair Queuing Key problem with FQ is core routers Must maintain state for 1000’s of flows Must update state at Gbps line speeds CSFQ (Core-Stateless FQ) objectives Edge routers should do complex tasks since they have fewer flows Core routers can do simple tasks No per-flow state/processing  this means that core routers can only decide on dropping packets not on order of processing Can only provide max-min bandwidth fairness not delay allocation

40 Core-Stateless Fair Queuing Edge routers keep state about flows and do computation when packet arrives DPS (Dynamic Packet State) Edge routers label packets with the result of state lookup and computation Core routers use DPS and local measurements to control processing of packets

41 Edge Router Behavior Monitor each flow i to measure its arrival rate (r i ) EWMA of rate Non-constant EWMA constant e -T/K where T = current interarrival, K = constant Helps adapt to different packet sizes and arrival patterns Rate is attached to each packet

42 Core Router Behavior Keep track of fair share rate α Increasing α does not increase load (F) by N * α F(α) = Σ i min(r i, α)  what does this look like? Periodically update α Keep track of current arrival rate Only update α if entire period was congested or uncongested Drop probability for packet = max(1- α/r, 0)

43 F vs. Alpha New alpha C [linked capacity] r1r2r3old alpha alpha F

44 Estimating Fair Share Need F(α) = capacity = C Can’t keep map of F(α) values  would require per flow state Since F(α) is concave, piecewise-linear F(0) = 0 and F(α) = current accepted rate = F c F(α) = F c / α F(α new ) = C  α new = α old * C/F c What if a mistake was made? Forced into dropping packets due to buffer capacity When queue overflows α is decreased slightly

45 Other Issues Punishing fire-hoses – why? Easy to keep track of in a FQ scheme What are the real edges in such a scheme? Must trust edges to mark traffic accurately Could do some statistical sampling to see if edge was marking accurately

Discussion Comments Is CSFQ more scalable? Trusting the edge 46

47 Important Lessons How does TCP implement AIMD? Sliding window, slow start & ack clocking How to maintain ack clocking during loss recovery  fast recovery How does TCP fully utilize a link? Role of router buffers Fairness and isolation in routers Why is this hard? What does it achieve – e.g. do we still need congestion control?

48 Next Lecture: TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks

EXTRA SLIDES The rest of the slides are FYI

50 Overview Fairness Fair-queuing Core-stateless FQ Other FQ variants

Stochastic Fair Queuing Compute a hash on each packet Instead of per-flow queue have a queue per hash bin An aggressive flow steals traffic from other flows in the same hash Queues serviced in round-robin fashion Has problems with packet size unfairness Memory allocation across all queues When no free buffers, drop packet from longest queue 51

52 Deficit Round Robin Each queue is allowed to send Q bytes per round If Q bytes are not sent (because packet is too large) deficit counter of queue keeps track of unused portion If queue is empty, deficit counter is reset to 0 Uses hash bins like Stochastic FQ Similar behavior as FQ but computationally simpler

53 Self-clocked Fair Queuing Virtual time to make computation of finish time easier Problem with basic FQ Need be able to know which flows are really backlogged They may not have packet queued because they were serviced earlier in mapping of bit-by-bit to packet This is necessary to know how bits sent map onto rounds Mapping of real time to round is piecewise linear  however slope can change often

54 Self-clocked FQ Use the finish time of the packet being serviced as the virtual time The difference in this virtual time and the real round number can be unbounded Amount of service to backlogged flows is bounded by factor of 2

55 Start-time Fair Queuing Packets are scheduled in order of their start not finish times Self-clocked  virtual time = start time of packet in service Main advantage  can handle variable rate service better than other schemes