Queueing theory, control theory, & buffer sizing Damon Wischik www.wischik.com/damon DARPA grant W911NF05-1-0254.

Slides:



Advertisements
Similar presentations
EE384Y: Packet Switch Architectures
Advertisements

Restless bandits and congestion control Mark Handley, Costin Raiciu, Damon Wischik UCL.
Queueing theory and Internet congestion control Damon Wischik, UCL Mark Handley, UCL Gaurav Raina, Cambridge / IIT Madras.
Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.
CS 268: Lecture 7 (Beyond TCP Congestion Control) Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences University.
Ahmed El-Hassany CISC856: CISC 856 TCP/IP and Upper Layer Protocols Slides adopted from: Injong Rhee, Lisong Xu.
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.
TCP Stability and Resource Allocation: Part II. Issues with TCP Round-trip bias Instability under large bandwidth-delay product Transient performance.
Fair queueing and congestion control Jim Roberts (France Telecom) Joint work with Jordan Augé Workshop on Congestion Control Hamilton Institute, Sept 2005.
Sizing Router Buffers Guido Appenzeller Isaac Keslassy Nick McKeown Stanford University.
On Modeling Feedback Congestion Control Mechanism of TCP using Fluid Flow Approximation and Queuing Theory  Hisamatu Hiroyuki Department of Infomatics.
Control Theory in TCP Congestion Control and new “FAST” designs. Fernando Paganini and Zhikui Wang UCLA Electrical Engineering July Collaborators:
Congestion Control Tanenbaum 5.3, /12/2015Congestion Control (A Loss Based Technique: TCP)2 What? Why? Congestion occurs when –there is no reservation.
Designing Networks with Little or No Buffers or Can Gulliver Survive in Lilliput? Yashar Ganjali High Performance Networking Group Stanford University.
High Performance All-Optical Networks with Small Buffers Yashar Ganjali High Performance Networking Group Stanford University
AQM for Congestion Control1 A Study of Active Queue Management for Congestion Control Victor Firoiu Marty Borden.
Buffer Sizing for Congested Internet Links Chi Yin Cheung Cs 395 Advanced Networking.
High Performance Networking with Little or No Buffers Yashar Ganjali High Performance Networking Group Stanford University
TCP Stability and Resource Allocation: Part I. References The Mathematics of Internet Congestion Control, Birkhauser, The web pages of –Kelly, Vinnicombe,
High speed TCP’s. Why high-speed TCP? Suppose that the bottleneck bandwidth is 10Gbps and RTT = 200ms. Bandwidth delay product is packets (1500.
High Performance Networking with Little or No Buffers Yashar Ganjali on behalf of Prof. Nick McKeown High Performance Networking Group Stanford University.
Sizing Router Buffers (Summary)
Sizing Router Buffers Nick McKeown Guido Appenzeller & Isaac Keslassy SNRC Review May 27 th, 2004.
Modeling TCP in Small-Buffer Networks
Fluid-based Analysis of a Network of AQM Routers Supporting TCP Flows with an Application to RED Vishal Misra Wei-Bo Gong Don Towsley University of Massachusetts,
1 Emulating AQM from End Hosts Presenters: Syed Zaidi Ivor Rodrigues.
Estimating Congestion in TCP Traffic Stephan Bohacek and Boris Rozovskii University of Southern California Objective: Develop stochastic model of TCP Necessary.
Congestion Control for High Bandwidth-delay Product Networks Dina Katabi, Mark Handley, Charlie Rohrs.
Routers with Small Buffers Yashar Ganjali High Performance Networking Group Stanford University
Congestion Control for High Bandwidth-Delay Product Environments Dina Katabi Mark Handley Charlie Rohrs.
1 A State Feedback Control Approach to Stabilizing Queues for ECN- Enabled TCP Connections Yuan Gao and Jennifer Hou IEEE INFOCOM 2003, San Francisco,
Buffer requirements for TCP: queueing theory & synchronization analysis Gaurav RainaDamon Wischik CambridgeUCL.
New Designs for the Internet Why can’t I get higher throughput? Why is my online video jerky? How is capacity shared in the Internet?
Buffer requirements for TCP Damon Wischik DARPA grant W911NF
The teleology of Internet congestion control Damon Wischik, Computer Science, UCL.
CS144 An Introduction to Computer Networks
Queueing analysis of a feedback- controlled (TCP/IP) network Gaurav RainaDamon WischikMark Handley CambridgeUCLUCL.
Congestion models for bursty TCP traffic Damon Wischik + Mark Handley University College London DARPA grant W911NF
TFRC: TCP Friendly Rate Control using TCP Equation Based Congestion Model CS 218 W 2003 Oct 29, 2003.
Fluid-based Analysis of a Network of AQM Routers Supporting TCP Flows with an Application to RED Vishal Misra Wei-Bo Gong Don Towsley University of Massachusetts,
Queueing theory for TCP Damon Wischik University College London TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
1 On Class-based Isolation of UDP, Short-lived and Long-lived TCP Flows by Selma Yilmaz Ibrahim Matta Computer Science Department Boston University.
27th, Nov 2001 GLOBECOM /16 Analysis of Dynamic Behaviors of Many TCP Connections Sharing Tail-Drop / RED Routers Go Hasegawa Osaka University, Japan.
Congestion Control for High Bandwidth-Delay Product Networks D. Katabi (MIT), M. Handley (UCL), C. Rohrs (MIT) – SIGCOMM’02 Presented by Cheng.
Queueing theory for TCP Damon Wischik, UCL Gaurav Raina, Cambridge.
The history of the Internet 1974: First draft of TCP/IP “A protocol for packet network interconnection”, Vint Cerf and Robert Kahn 1983: ARPANET switches.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
1 Time-scale Decomposition and Equivalent Rate Based Marking Yung Yi, Sanjay Shakkottai ECE Dept., UT Austin Supratim Deb.
New designs for Internet congestion control Damon Wischik (UCL)
Analysis of RED Goal: impact of RED on loss and delay of bursty (TCP) and less bursty or smooth (UDP) traffic RED eliminates loss bias against bursty traffic.
The Macroscopic behavior of the TCP Congestion Avoidance Algorithm.
XCP: eXplicit Control Protocol Dina Katabi MIT Lab for Computer Science
TCP Traffic Characteristics—Deep buffer Switch
Queueing theory for TCP Damon Wischik, UCL Gaurav Raina, Cambridge.
Congestion Control for High Bandwidth-Delay Product Networks Dina Katabi, Mark Handley, Charlie Rohrs Presented by Yufei Chen.
Buffers: How we fell in love with them, and why we need a divorce Hot Interconnects, Stanford 2004 Nick McKeown High Performance Networking Group Stanford.
Networks with Very Small Buffers Yashar Ganjali, Guido Appenzeller, High Performance Networking Group Prof. Ashish Goel, Prof. Tim Roughgarden, Prof. Nick.
Open Issues in Router Buffer Sizing
Internet Congestion Control Research Group
Lecture 19 – TCP Performance
Amogh Dhamdhere, Hao Jiang and Constantinos Dovrolis
FAST TCP : From Theory to Experiments
CS640: Introduction to Computer Networks
Internet congestion control
Lecture 16, Computer Networks (198:552)
TCP Congestion Control
Understanding Congestion Control Mohammad Alizadeh Fall 2018
Gaurav Raina Damon Wischik Mark Handley Cambridge UCL UCL
Presentation transcript:

Queueing theory, control theory, & buffer sizing Damon Wischik DARPA grant W911NF

My interest Internet routers have buffers, –to accomodate bursts in traffic –to keep the link fully utilized How big do the buffers need to be, to accommodate TCP traffic? –3 GByte? Rule of thumb says buffer = bandwidth×delay –300 MByte? buffer = bandwidth×delay/√#flows [Appenzeller, Keslassy, McKeown, 2004] –30 kByte? constant buffer size, independent of line rate [Kelly, Key, etc.] What is the role of probabilistic queueing theory? Is it all just fluid models & differential equations?

if (seqno > _last_acked) { if (!_in_fast_recovery) { _last_acked = seqno; _dupacks = 0; inflate_window(); send_packets(now); _last_sent_time = now; return; } if (seqno < _recover) { uint32_t new_data = seqno - _last_acked; _last_acked = seqno; if (new_data < _cwnd) _cwnd -= new_data; else _cwnd=0; _cwnd += _mss; retransmit_packet(now); send_packets(now); return; } uint32_t flightsize = _highest_sent - seqno; _cwnd = min(_ssthresh, flightsize + _mss); _last_acked = seqno; _dupacks = 0; _in_fast_recovery = false; send_packets(now); return; } if (_in_fast_recovery) { _cwnd += _mss; send_packets(now); return; } _dupacks++; if (_dupacks!=3) { send_packets(now); return; } _ssthresh = max(_cwnd/2, (uint32_t)(2 * _mss)); retransmit_packet(now); _cwnd = _ssthresh + 3 * _mss; _in_fast_recovery = true; _recover = _highest_sent; } time [0-8 sec] traffic rate [0-100 kB/sec] TCP

TCP sawtooth & buffer size rate time The traffic rate produced by a TCP flow follows a ‘sawtooth’ To prevent the link’s going idle, the buffer must be big enough to smooth out a sawtooth –buffer = bandwidth×delay When there are many TCP flows, the sawteeth should average out, so a smaller buffer is sufficient –buffer = bandwidth×delay/√#flows [Appenzeller, Keslassy, McKeown, 2004] If we could keep the traffic rate just a little bit lower, virtually no buffer would be needed......unless the flows are synchronized

TCP packets & buffer size TCP traffic is made up of packets –there may be packet clumps, if the access network is fast –or the packets may be spaced out Even if we manage to keep total data rate < service rate, chance alignment of packets will still lead to some queueing & loss, so we can’t dispense with buffers entirely packets rate time

Formulate a maths question What is the limiting queue-length process, as N , in the three regimes –large buffers B (N) =BN –intermediate buffers B (N) =B√N –small buffers B (N) =B Why are these limiting regimes interesting? What are the alternatives? [Bain, 2003] N TCP flows Service rate NC Buffer size B (N) Round trip time RTT

TCP traffic model Desynchronized TCP flows: Synchronized TCP flows: + + = + + = aggregate traffic rate time individual flow rates A single TCP flow follows a characteristic ‘sawtooth’

TCP traffic model Desynchronized TCP flows: Synchronized TCP flows: + + = + + = aggregate traffic rate time individual flow rates A single TCP flow follows a characteristic ‘sawtooth’ Many TCP flows added together are smoother

TCP traffic model When there are many TCP flows, the average traffic rate x t varies smoothly, according to a delay differential equation [Misra, Gong, Towsley, 2000] The equation involves –p t, the packet loss probability at time t –RTT, the average round trip time time aggregate traffic rate

Queue model How does packet loss probability p t depend on buffer size? The answer depends on the buffer size –large buffers B (N) =BN –intermediate buffers B (N) =B√N –small buffers B (N) =B

Large buffer B (N) = BN When the aggregate data rate is less than the service rate, the queue stays small No packet drops, so TCPs increase their data rate aggregate data rate queue size [0-160pkt] time [0-3.5s] service rate

When the aggregate data rate is less than the service rate, the queue stays small No packet drops, so TCPs increase their data rate Eventually the aggregate data rate exceeds the service rate, and a queue starts to build up When the queue is full, packets start to get dropped aggregate data rate queue size [0-160pkt] time [0-3.5s] service rate drops Large buffer B (N) = BN

When the aggregate data rate is less than the service rate, the queue stays small No packet drops, so TCPs increase their data rate Eventually the aggregate data rate exceeds the service rate, and a queue starts to build up When the queue is full, packets start to get dropped One round trip time later, TCPs respond and cut back They may overreact, leading to synchronization i.e. periodic fluctuations aggregate data rate queue size [0-160pkt] time [0-3.5s] service rate Large buffer B (N) = BN

Queue size & arrival rate vary on the same timescale The total queue size Nq t satisfies the fluid model When the queue is near full, Little’s Law gives the drop probability [cf McDonald, Reynier, 2003] aggregate data rate queue size [0-160pkt] time [0-3.5s] service rate Large buffer B (N) = BN

Small buffer B (N) =B As the number of flows N and the capacity NC increase, we observe –queues aise because of chance alignments of packets –queue size fluctuates more and more rapidly, much more rapidly than variations in arrival rate –queue size distribution does not change –like an M N x / M NC / 1 / B queue queue size [0-15 pkt] time [0-5 sec] max queueing delay 19 ms max queueing delay 1.9 ms max queueing delay 0.19 ms

Small buffer B (N) =B We conjecture –a typical busy cycle lasts O(1/N) –packet arrivals over timescale O(1/N) look like a Poisson process with constant arrival rate x t  x t+O(1/N) –drop probability converges to that for an M/D/1/B queue: p t  (x t /C) B Evidence –In a queue with a small buffer, fed by arbitrary exogenous traffic, a typical busy cycle lasts O(1/N), and queue size matches that in an M/D/1/B queue [Cao, Ramanan, 2002] –Over short timescales (<1ms), TCP traffic is approximately Poisson [“Internet traffic tends toward Poisson and independent as the load increases”, Cao, Cleveland, Lin, Sun, 2002] queue size [0-15 pkt] time [0-5 sec] max queueing delay 19 ms max queueing delay 1.9 ms max queueing delay 0.19 ms

Intermediate buffers B (N) =B√N queue size arrival rate x time N=50N=100N=500N=1000 Consider a queue fed by N flows, each of rate x pkts/sec (x=0.95 then 1.05 pkts/sec) served at rate NC (C=1 pkt/sec) with buffer size B√N (B=3 pkts)

System summary x t = average traffic rate at time t p t = packet loss probability at time t C = capacity/flow B = buffer size RTT = round trip time N=# flows TCP traffic model Small buffer queueing model (though this is sensitive to traffic statistics) Large buffer queueing model

Standard TCP, single bottleneck link, no AQM service C=1.2 kpkt/sec, RTT=200 ms, #flows N=20 B=20 pkts (small buffer) B=54 pkts (intermediate buffer) B=240 pkts (large buffer) Illustration 20 flows

Standard TCP, single bottleneck link, no AQM service C=12 kpkt/sec, RTT=200 ms, #flows N=200 B=20 pkts (small buffer) B=170 pkts (intermediate buffer) B=2,400 pkts (large buffer) Illustration 200 flows

Standard TCP, single bottleneck link, no AQM service C=120 kpkt/sec, RTT=200 ms, #flows N=2000 B=20 pkts (small buffer) B=537 pkts (intermediate buffer) B=24,000 pkts (large buffer) Illustration 2000 flows

Stability/instability analysis For some values of C*RTT, the dynamical system is stable –we calculate the steady-state traffic rate, loss probability etc. For others it is unstable and there are oscillations (i.e. the flows are partially synchronized) –we calculate the amplitude of the oscillations [Gaurav Raina, PhD thesis, 2005] time traffic rate x t /C

traffic intensity  = x/C log 10 of pkt loss probability p TCP throughput equation queue equation extent of oscillations in  Instability plot small-buffer case

C*RTT=4 pkts C*RTT=20 pkts C*RTT=100 pkts traffic intensity  = x/C log 10 of pkt loss probability p Instability plot small-buffer case B=60 pkts

traffic intensity  = x/C log 10 of pkt loss probability p Instability plot small-buffer case extent of oscillations in  (algebraic approximation) extent of oscillations in  (numerical integration)

traffic intensity  = x/C log 10 of pkt loss probability p Instability plot small-buffer case histogram of extent of oscillations in  (packet-level simulation) extent of oscillations in  (numerical integration)

traffic intensity  = x/C log 10 of pkt loss probability p Instability plot small-buffer case queue size [0-60pkt] frequency histogram of queue size (packet-level simulation)

Intermediate buffers buffer buffer = C*RTT*√N or Large buffers buffer = C*RTT*N Large buffers with AQM buffer = C*RTT*N *{¼,1,4} Small buffers buffer = {10,20,50} pkts Small buffers, ScalableTCP buffer = {50,1000} pkts [Vinnicombe 2002, T.Kelly 2002] Alternative buffer-sizing rules

Limitations/concerns Surely bottlenecks are at the access network, not the core network? –Unwise to rely on this! –If the core is underutilized, it definitely doesn’t need big buffers –The small-buffer theory works fine for as few as 20 flows The Poisson model sometimes breaks down –because of short-timescale packet clumps –need more measurement of short-timescale Internet traffic statistics Limited validation so far [McKeown et al. at Stanford, Level3, Internet2] Proper validation needs –goodly amount of traffic –full measurement kit –ability to control buffer size

Conclusion Buffer sizes can be very small –a buffer of 25pkt gives link utilization > 90% –small buffers mean that TCP flows get more regular feedback, so they can better judge how much capacity is available –use Poisson traffic models for the router, differential equation models for aggregate traffic TCP can be improved with simple changes –e.g. space out the packets –e.g. modify the window increase/decrease rules [ScalableTCP: Vinnicombe 2004, Kelly 2004; XCP: Katabi, Handley, Rohrs 2000] –any future transport protocol should be designed along these lines –improved TCP may find its way into Linux/Windows within 5 years