COMP/ELEC 429/556 Introduction to Computer Networks

Slides:



Advertisements
Similar presentations
1 CNPA B Nasser S. Abouzakhar Queuing Disciplines Week 8 – Lecture 2 16 th November, 2009.
Advertisements

Courtesy: Nick McKeown, Stanford 1 Intro to Quality of Service Tahir Azim.
CS 268: Lecture 8 Router Support for Congestion Control Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 16: Congestion control II Slides used with.
Ion Stoica, Scott Shenker, and Hui Zhang SIGCOMM’98, Vancouver, August 1998 subsequently IEEE/ACM Transactions on Networking 11(1), 2003, pp Presented.
Worst-case Fair Weighted Fair Queueing (WF²Q) by Jon C.R. Bennett & Hui Zhang Presented by Vitali Greenberg.
Scheduling CS 215 W Keshav Chpt 9 Problem: given N packet streams contending for the same channel, how to schedule pkt transmissions?
CS 268: Lecture 15/16 (Packet Scheduling) Ion Stoica April 8/10, 2002.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
CS 268: Lecture 8 (Router Support for Congestion Control) Ion Stoica February 19, 2002.
ACN: Congestion Control1 Congestion Control and Resource Allocation.
Computer Networking Lecture 17 – Queue Management As usual: Thanks to Srini Seshan and Dave Anderson.
CS144, Stanford University Error in Q3-7. CS144, Stanford University Using longest prefix matching, the IP address will match which entry? a /8.
Packet Scheduling From Ion Stoica. 2 Packet Scheduling  Decide when and what packet to send on output link -Usually implemented at output interface 1.
CIS679: Scheduling, Resource Configuration and Admission Control r Review of Last lecture r Scheduling r Resource configuration r Admission control.
CSE QoS in IP. CSE Improving QOS in IP Networks Thus far: “making the best of best effort”
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.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 4: Fundamental network design issues Slides.
Fair Queueing. 2 First-Come-First Served (FIFO) Packets are transmitted in the order of their arrival Advantage: –Very simple to implement Disadvantage:
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.
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
Nick McKeown Spring 2012 Lecture 2,3 Output Queueing EE384x Packet Switch Architectures.
Packet Scheduling: SCFQ, STFQ, WF2Q Yongho Seok Contents Review: GPS, PGPS SCFQ( Self-clocked fair queuing ) STFQ( Start time fair queuing ) WF2Q( Worst-case.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Principles of Congestion Control Some slides.
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.
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.
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.
Providing QoS in IP Networks
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
04/02/08 1 Packet Scheduling IT610 Prof. A. Sahoo KReSIT.
Instructor Materials Chapter 6: Quality of Service
QoS & Queuing Theory CS352.
Topics discussed in this section:
Approaches towards congestion control
Chapter 6 Queuing Disciplines
Net 221D : Computer Networks Fundamentals
Congestion Control and Resource Allocation
Switching Techniques In large networks there might be multiple paths linking sender and receiver. Information may be switched as it travels through various.
Stratified Round Robin: A Low Complexity Packet Scheduler with Bandwidth Fairness and Bounded Delay Sriram Ramabhadran Joseph Pasquale Presented by Sailesh.
EE 122: Router Support for Congestion Control: RED and Fair Queueing
Transport Layer Unit 5.
TCP, XCP and Fair Queueing
COMP/ELEC 429/556 Introduction to Computer Networks
Quality of Service For Traffic Aggregates
Variations of Weighted Fair Queueing
Fair Queueing.
Advance Computer Networking
COMP/ELEC 429/556 Introduction to Computer Networks
Switching Techniques.
Computer Science Division
Advance Computer Networking
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Variations of Weighted Fair Queueing
Network Simulation NET441
COMP/ELEC 429 Introduction to Computer Networks
Advanced Computer Networks
COMP/ELEC 429/556 Introduction to Computer Networks
COMP/ELEC 429/556 Fall 2017 Homework #2
Congestion Control Reasons:
Introduction to Packet Scheduling
Congestion Control and Resource Allocation
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
Fair Queueing.
A Simple QoS Packet Scheduler for Network Routers
Introduction to Packet Scheduling
کنترل جریان امیدرضا معروضی.
Presentation transcript:

COMP/ELEC 429/556 Introduction to Computer Networks Weighted Fair Queuing Some slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Critical Features of TCP Increase rate until packet loss What’s the problem? Use loss as indication of congestion Slow start to probe for initial rate AIMD mechanism oscillates around proper rate Relies on AIMD behavior of end hosts T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Some Answers Increase rate until packet loss Drives network into congestion High queuing delay, inefficient Use loss as indication of congestion Cannot distinguish congestion from packet corruption Slow start to probe for initial rate Bad for short lived flows (e.g. most Web transfers, a lot of Internet traffic is web transfer) AIMD mechanism oscillates around proper rate Rate is not smooth Bad for streaming applications (e.g. video) Inefficient utilization Relies on AIMD behavior of end hosts for fairness People can cheat (not use AIMD) People can open many parallel connections T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Can Routers Provide Bandwidth Guarantee to a Traffic Flow? If so, then sender can request for a bandwidth guarantee and knows exactly what rate to send at No packet loss, no congestion No need for probing bandwidth (slow start) No AIMD oscillation No cheating The answer is yes, but it’ll add complexity to routers ??? T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Guaranteeing Performance Requires Flow Isolation FIFO queue of packets in router memory buffer flow 1 Classifier flow 2 Scheduler 1 2 flow n T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Classifier A “flow” is a sequence of packets that are related Classifier takes a packet and matches it against flow definitions to decide which flow it belongs Examples: All TCP packets from Eugene’s web browser on machine A to web server on machine B All packets from Rice All packets between Rice and CMU All UDP packets from Rice ECE department A flow may be defined by bits in the packet source/destination IP address (32 bits) or address prefix source/destination port number (16 bits) protocol type (8 bits) type of service (4 bits) even bits beyond TCP and IP headers could be used flow 1 flow 2 flow n Classifier Scheduler T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Scheduler Decides how the output link capacity is shared by flows A chance to be smart: Transmission of packets held in queues can be *scheduled* Which stored packet goes out next? Which is more “important”? Impacts quality of service flow 1 flow 2 flow n Classifier Scheduler T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

What is Weighted Fair Queuing? Packet queues w1 w2 R wn A mathematical model for flow scheduling Each flow i given a weight (importance) wi WFQ guarantees a minimum service rate to flow i ri = R * wi / (w1 + w2 + ... + wn) Implies isolation among flows (one cannot mess up another) T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

What is the Intuition? Fluid Flow water pipes w2 w3 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Fluid Flow System: Example 1 Packet Size (bits) Packet inter-arrival time (ms) Arrival Rate (Kbps) Flow 1 1000 10 100 Flow 2 500 50 Flow 1 (w1 = 1) 100 Kbps Flow 2 (w2 = 1) 1 2 3 4 5 Flow 1 (arrival traffic) time Flow 2 (arrival traffic) time 1 2 3 4 5 6 Service in fluid flow system time (ms) 10 20 30 40 50 60 70 80 1 2 3 1 2 4 3 5 6 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Fluid Flow System: Example 2 link Red flow has packets backlogged between time 0 and 10 Backlogged flow  flow’s queue not empty Other flows have packets continuously backlogged All packets have the same size flows weights 5 1 1 1 1 1 2 4 6 8 10 15 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Service Rate and Packet Delay in Fluid Flow System WFQ guarantees a minimum service rate to flow i ri = R * wi / (w1 + w2 + ... + wn) What worst case delays are experienced by individual packets in the FFS? Service curve slope = ri bits Worst case packet delay Packet arrival curve time (s) T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Implementation in Packet System Packet (Real) system: packet transmission cannot be preempted. Why? Solution: serve packets in the order in which they would have finished being transmitted in the fluid flow system T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Packet System: Example 1 Assume for this example all packets are waiting from time 0 Service in fluid flow system 2 4 6 8 10 Select the packet that is waiting and finishes first in the fluid flow system Packet system 2 4 6 8 10 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Packet System: Example 2 1 2 3 4 5 Flow 1 (arrival traffic) time Flow 2 (arrival traffic) time 1 2 3 4 5 6 Service in fluid flow system 1 2 3 1 2 4 3 1 4 3 5 4 3  5 5 6 5 time (ms) Select the packet that is waiting and finishes first in the fluid flow system Packet system 1 2 1 3 2 3 4 4 5 5 6 time T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Implementation Challenge Four flows, each with weight 1 Flow 1 time Flow 2 time Flow 3 time Flow 4 time ε 1 2 3 Finish times computed at time 0 time time Finish times re-computed at time ε Note that finishing order of packets from flows 1, 2, and 3 unaffected 1 2 3 4 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Implementation Challenge Need to compute the finish time of a packet in the fluid flow system… … but the finish time may change as new flows arrive! Need to update the finish times of all packets that are in service in the fluid flow system when a new flow arrives But this is very expensive; a high speed router may need to handle hundred of thousands of flows! The new finish times don’t affect ordering of packets that are in service in the fluid flow system (a lot of work for nothing) Can we capture ordering without using real world finish times?? T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Bit-by-Bit Round Robin Insight If flows can be served one bit at a time, the fluid flow system can be approximated by bit-by-bit weighted round robin During each round from each flow that has data to send, send a number of bits equal to the flow’s weight Each packet therefore requires a fixed number of rounds to finish (depends only on weight and packet size); the finishing round number does not change even when new flows arrive Packet queues 30 bits 3 100 bits/sec How many seconds spent in each round? Note the answer depends on the total weights 5 20 bits 34 bits 17 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Solution: Virtual Time Solution: instead of the packet finish time, maintain the round # when a packet finishes (virtual finishing time) Virtual finishing time doesn’t change when a new flow arrives Packet ordering based on virtual finishing time is the same as that based on real finishing time. Need to compute system virtual time function V(t) index of the round in the bit-by-bit round robin scheme at time t T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Example All flow weight = 1 time Flow 2 time Flow 3 time Flow 4 time ε All flow weight = 1 Suppose each packet is 1000 bits, so takes 1000 rounds to finish. So, first packets of F1, F2, F3 finish at virtual time 1000 When packet F4 arrives at virtual time 1 (after one round), the virtual finish time of packet F4 is 1001 But the virtual finish time of packet F1,2,3 remains 1000 Finishing order is preserved T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Computing System Virtual Time (Round #): V(t) V(t) increases inversely proportionally to the sum of the weights of the backlogged flows Since round # increases slower when there are more flows to visit each round. Flow 1 (w1 = 1) time Flow 2 (w2 = 1) time 3 4 5 1 2 1 2 3 4 5 6 V(t) C/2 C T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Weighted Fair Queuing Implementation Define virtual finishing time of packet k of flow i arrival time of packet k of flow i length of packet k of flow i wi weight of flow i The virtual finishing time of packet k+1 of flow i is Smallest virtual finishing time first scheduling policy / wi T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Recall in the Fluid Flow System Service curve slope = ri bits Worst case packet delay Packet arrival curve time (s) T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Properties of WFQ Implementation Theorem: WFQ guarantees that any packet is finished within max_packet_length/link_rate of its finish time in the fluid flow system Thus WFQ can guarantee bandwidth and delay Weights assigned appropriately and admission control is performed Packets paced by sender according to guaranteed bandwidth Another way to use WFQ is to assign all flows the same weight and perform no admission control Every flow gets a “max-min” fair share, provides performance isolation among flows See proof at the end of the slide deck T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Internet Today FIFO queues are used for most network traffic No classifier, no scheduler, best-effort Sophisticated mechanisms tend to be more common near the “edge” of the network E.g. At campus routers Use classifier to pick out BitTorrent packets Use scheduler to limit bandwidth consumed by BitTorrent traffic T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Remainder of this set of slides are for your reference only Remainder of this set of slides are for your reference only. They will not be needed for assignments. T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Proof (1) Packet pk with length Lk Subscript: index of pkt sent in pkt system Fluid Flow System Behavior uk: finish ak: arrival time Packet System Behavior tk: finish ak: arrival time Want to prove: Lmax: largest allowed pkt r: network link rate T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Proof (2) Let m be the largest packet index such that um > uk but tm < tk More generally, we have um > uk ≥ ui and tm < ti < tk Fluid Flow System Behavior ... ui uk um time Packet System Behavior ... ti tm tk time T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Proof (3) tm tk ti pm started transmission at Thus Q.E.D. Packet System Behavior ... ti tm tk time pm started transmission at Thus Q.E.D. T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Another Insight Recall m is the largest packet index such that um > uk but tm < tk If no such pm exists, then simply tk ≤ uk That is, the packet system can be ahead of the fluid flow system by an unbounded amount 2 10 4 6 8 Service in fluid flow system Packet T. S. Eugene Ng eugeneng at cs.rice.edu Rice University