EE 122: Router Support for Congestion Control: RED and Fair Queueing

Slides:



Advertisements
Similar presentations
Computer Networking Lecture 20 – Queue Management and QoS.
Advertisements

CSIT560 Internet Infrastructure: Switches and Routers Active Queue Management Presented By: Gary Po, Henry Hui and Kenny Chong.
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.
CS 4700 / CS 5700 Network Fundamentals Lecture 12: Router-Aided Congestion Control (Drop it like it’s hot) Revised 3/18/13.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
The War Between Mice and Elephants Presented By Eric Wang Liang Guo and Ibrahim Matta Boston University ICNP
Networks: Congestion Control1 Congestion Control.
CS 268: Lecture 15/16 (Packet Scheduling) Ion Stoica April 8/10, 2002.
EE689 Lecture 5 Review of last lecture More on HPF RED.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks TCP Variations Computer Science Division Department of Electrical Engineering and Computer.
CS 268: Lecture 8 (Router Support for Congestion Control) Ion Stoica February 19, 2002.
Computer Networking Lecture 17 – Queue Management As usual: Thanks to Srini Seshan and Dave Anderson.
Random Early Detection Gateways for Congestion Avoidance
Core Stateless Fair Queueing Stoica, Shanker and Zhang - SIGCOMM 98 Rigorous fair Queueing requires per flow state: too costly in high speed core routers.
Lightweight Active Router-Queue Management for Multimedia Networking M. Parris, K. Jeffay, and F.D. Smith Department of Computer Science University of.
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.
Packet Scheduling From Ion Stoica. 2 Packet Scheduling  Decide when and what packet to send on output link -Usually implemented at output interface 1.
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.
ACN: RED paper1 Random Early Detection Gateways for Congestion Avoidance Sally Floyd and Van Jacobson, IEEE Transactions on Networking, Vol.1, No. 4, (Aug.
1 On Class-based Isolation of UDP, Short-lived and Long-lived TCP Flows by Selma Yilmaz Ibrahim Matta Computer Science Department Boston University.
Fair Queueing. 2 First-Come-First Served (FIFO) Packets are transmitted in the order of their arrival Advantage: –Very simple to implement Disadvantage:
27th, Nov 2001 GLOBECOM /16 Analysis of Dynamic Behaviors of Many TCP Connections Sharing Tail-Drop / RED Routers Go Hasegawa Osaka University, Japan.
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.
CSE 561 – Congestion Control with Network Support David Wetherall Spring 2000.
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”
15744 Course Project1 Evaluation of Queue Management Algorithms Ningning Hu, Liu Ren, Jichuan Chang 30 April 2001.
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
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.
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.
Peer-to-Peer Networks 13 Internet – The Underlay Network
Congestion Avoidance Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
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.
Other Methods of Dealing with Congestion
QoS & Queuing Theory CS352.
CS 268: Computer Networking
Blue: An Alternative Approach to Active Queue Management
Congestion Control and AQM
Congestion Control: The Role of the Routers
Router-Assisted Congestion Control
Chapter 6 Queuing Disciplines
Congestion Control and Resource Allocation
Advance Computer Networking
TCP, XCP and Fair Queueing
Queuing and Queue Management
COMP/ELEC 429/556 Introduction to Computer Networks
Random Early Detection Gateways for Congestion Avoidance
15-744: Computer Networking
Other Methods of Dealing with Congestion
Fair Queueing.
Advance Computer Networking
Other Methods of Dealing with Congestion
Computer Science Division
Max Min Fairness How define fairness?
Advance Computer Networking
EE 122: Lecture 7 Ion Stoica September 18, 2001.
COMP/ELEC 429 Introduction to Computer Networks
Advanced Computer Networks
15-744: Computer Networking
EECS 122: Introduction to Computer Networks TCP Variations
Congestion Control and Resource Allocation
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
کنترل جریان امیدرضا معروضی.
Presentation transcript:

EE 122: Router Support for Congestion Control: RED and Fair Queueing Ion Stoica Oct. 30 – Nov. 4, 2002

Router Support For Congestion Management Traditional Internet Congestion control mechanisms at end-systems, mainly implemented in TCP Routers play little role Router mechanisms affecting congestion management Scheduling Buffer management Traditional routers FIFO Tail drop istoica@cs.berkeley.edu

Router Packet Processing Scheduling: Decide when to send a packet Decide which packet to transmit Buffer management: Decide when to drop a packet Decide which packet to drop istoica@cs.berkeley.edu

FIFO: First-In First-Out Maintain a queue to store all packets When to send? When there is at least one packet in the queue Which packet to send? The packet at the head of the queue Next to transmit Arriving packet Queued packets istoica@cs.berkeley.edu

Tail-drop Buffer Management When to drop? When buffer full Which packet to drop The arriving packet Next to transmit Arriving packet Drop istoica@cs.berkeley.edu

Drawbacks of FIFO with Tail-drop Synchronizing effect for multiple TCP flows Buffer lock out by misbehaving flows Burst or multiple consecutive packet drops istoica@cs.berkeley.edu

Synchronizing effect for multiple TCP flows When buffer overflows many/all flows experience losses Flows which experience losses will scale down their transmission (by reducing the window size) This will cause the link to be underutilized … the process repeats Net result: inefficient link utilization istoica@cs.berkeley.edu

Buffer Lock Out by Misbehaving Flows “Aggressive” flows can squeeze out TCP flows Example: one 10 Mbps link shared by 1 UDP flow that sends at 10 Mbps, and does not implement any congestion control 31 TCP flows UDP UDP (#1) - 10 Mbps UDP (#1) TCP (#2) TCP (#2) . . . . . . TCP (#32) TCP (#32) Bottleneck link (10 Mbps) istoica@cs.berkeley.edu

Burst of Packet Losses A TCP flow sends a burst of packets that arrive at a router when buffer is full All packets in the burst are lost This may cause RTO to trigger: cwnd  1 For example, with TCP Reno if there are three packet losses in a window, this will almost sure trigger an RTO istoica@cs.berkeley.edu

FIFO Router with Two TCP Flows istoica@cs.berkeley.edu

Random Early Detection (RED) Routers (Floyd & Fall 93] Goals Avoid synchronizing multiple TCP flows Avoid burst of packet drops istoica@cs.berkeley.edu

RED FIFO scheduling Buffer management: Probabilistically discard packets Probability is computed as a function of average queue length (why average?) Discard Probability 1 Average Queue Length min_th max_th queue_len istoica@cs.berkeley.edu

RED (cont’d) min_th – minimum threshold max_th – maximum threshold avg_len – average queue length avg_len = (1-w)*avg_len + w*sample_len Discard Probability 1 min_th max_th queue_len Average Queue Length istoica@cs.berkeley.edu

Discard Probability (P) RED (cont’d) If (avg_len < min_th)  enqueue packet If (avg_len > max_th)  drop packet If (avg_len >= min_th and avg_len < max_th)  enqueue packet with probability P Discard Probability (P) 1 min_th max_th queue_len Average Queue Length istoica@cs.berkeley.edu

RED (cont’d) P = max_P*(avg_len – min_th)/(max_th – min_th) Improvements to spread the drops (see textbook) Discard Probability max_P 1 P Average Queue Length min_th max_th queue_len avg_len istoica@cs.berkeley.edu

RED Advantages Absorb burst better Avoids synchronization Signal end systems earlier istoica@cs.berkeley.edu

RED Router with Two TCP Sessions istoica@cs.berkeley.edu

Problems with RED No protection: if a flow misbehaves it will hurt the other flows Example: 1 UDP (10 Mbps) and 31 TCP’s sharing a 10 Mbps link UDP UDP (#1) - 10 Mbps UDP (#1) TCP (#2) TCP (#2) . . . . . . TCP (#32) TCP (#32) Bottleneck link (10 Mbps) istoica@cs.berkeley.edu

Solution? Round-robin among different flows [Nagle ‘87] one queue per flow istoica@cs.berkeley.edu

Round-Robin Discussion Advantages: protection among flows Misbehaving flows will not affect the performance of well-behaving flows Misbehaving flow – a flow that does not implement any congestion control FIFO does not have such a property Disadvantages: More complex than FIFO: per flow queue/state Biased toward large packets – a flow receives service proportional to the number of packets (When is this bad?) istoica@cs.berkeley.edu

Solution? Bit-by-bit round robin Can you do this in practice? No, packets cannot be preempted (why?) …we can only approximate it istoica@cs.berkeley.edu

Fair Queueing (FQ) [DKS’89] Define a fluid flow system: a system in which flows are served bit-by-bit Then serve packets in the increasing order of their deadlines Advantages Each flow will receive exactly its fair rate Note: FQ achieves max-min fairness istoica@cs.berkeley.edu

Max-Min Fairness Denote Max-min fair rate computation: C – link capacity N – number of flows ri – arrival rate Max-min fair rate computation: compute C/N if there are flows i such that ri <= C/N, update C and N if no, f = C/N; terminate go to 1 A flow can receive at most the fair rate, i.e., min(f, ri) istoica@cs.berkeley.edu

Example C = 10; r1 = 8, r2 = 6, r3 = 2; N = 3 C/3 = 3.33  C = C – r3 = 8; N = 2 C/2 = 4; f = 4 8 6 2 4 f = 4: min(8, 4) = 4 min(6, 4) = 4 min(2, 4) = 2 10 istoica@cs.berkeley.edu

Implementing Fair Queueing Idea: serve packets in the order in which they would have finished transmission in the fluid flow system istoica@cs.berkeley.edu

Example Flow 1 (arrival traffic) 1 2 3 4 5 6 time Flow 2 (arrival traffic) 1 2 3 4 5 time Service in fluid flow system 1 2 3 4 5 6 1 2 3 4 5 time Packet system 1 2 1 3 2 3 4 4 5 5 6 time istoica@cs.berkeley.edu

System Virtual Time: V(t) Measure service, instead of time V(t) slope – rate at which every active flow receives service C – link capacity N(t) – number of active flows in fluid flow system at time t V(t) time Service in fluid flow system 1 2 3 4 5 6 1 2 3 4 5 time istoica@cs.berkeley.edu

Fair Queueing Implementation Define - finishing time of packet k of flow i (in system virtual time reference system) - arrival time of packet k of flow i - length of packet k of flow i The finishing time of packet k+1 of flow i is istoica@cs.berkeley.edu

FQ Advantages FQ protect well-behaved flows from ill-behaved flows Example: 1 UDP (10 Mbps) and 31 TCP’s sharing a 10 Mbps link istoica@cs.berkeley.edu

Big Picture FQ does not eliminate congestion  it just manages the congestion You need both end-host congestion control and router support for congestion control end-host congestion control to adapt router congestion control to protect/isolate Don’t forget buffer management: you still need to drop in case of congestion. Which packet’s would you drop in FQ? one possibility: packet from the longest queue istoica@cs.berkeley.edu