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.

Slides:



Advertisements
Similar presentations
1 CONGESTION CONTROL. 2 Congestion Control When one part of the subnet (e.g. one or more routers in an area) becomes overloaded, congestion results. Because.
Advertisements

Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.
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.
EE 122: Congestion Control The Sequel October 1, 2003.
Congestion Control An Overview -Jyothi Guntaka. Congestion  What is congestion ?  The aggregate demand for network resources exceeds the available capacity.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
1 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
Networks: Congestion Control1 Congestion Control.
Lecture 9 Congestion Control: Part II EECS 122 University of California Berkeley.
Analysis and Simulation of a Fair Queuing Algorithm
Katz, Stoica F04 EECS 122: Introduction to Computer Networks TCP Variations Computer Science Division Department of Electrical Engineering and Computer.
Spring 2002CS 4611 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
CS 268: Lecture 8 (Router Support for Congestion Control) Ion Stoica February 19, 2002.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
Data Communication and Networks
Semester Copyright USM EEE449 Computer Networks Congestion En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room.
Computer Networking Lecture 17 – Queue Management As usual: Thanks to Srini Seshan and Dave Anderson.
Random Early Detection Gateways for Congestion Avoidance
Advanced Computer Networks : RED 1 Random Early Detection Gateways for Congestion Avoidance Sally Floyd and Van Jacobson, IEEE Transactions on Networking,
1 EE 122: Advanced TCP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 15: Congestion Control I Slides used with.
Link Scheduling & Queuing COS 461: Computer Networks
ACN: RED paper1 Random Early Detection Gateways for Congestion Avoidance Sally Floyd and Van Jacobson, IEEE Transactions on Networking, Vol.1, No. 4, (Aug.
Congestion Control - Supplementary Slides are adapted on Jean Walrand’s Slides.
27th, Nov 2001 GLOBECOM /16 Analysis of Dynamic Behaviors of Many TCP Connections Sharing Tail-Drop / RED Routers Go Hasegawa Osaka University, Japan.
9.7 Other Congestion Related Issues Outline Queuing Discipline Avoiding Congestion.
AQM & TCP models Courtesy of Sally Floyd with ICIR Raj Jain with OSU.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
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.
Winter 2008CS244a Handout 81 CS244a: An Introduction to Computer Networks Handout 8: Congestion Avoidance and Active Queue Management Nick McKeown Professor.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 19 – March 23, 2010.
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.
Advance Computer Networks Lecture#09 & 10 Instructor: Engr. Muhammad Mateen Yaqoob.
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.
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
ECEN 619, Internet Protocols and Modeling Prof. Xi Zhang Random Early Detection Gateways for Congestion Avoidance Sally Floyd and Van Jacobson, IEEE Transactions.
Queue Management Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Congestion Avoidance Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
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
Topics discussed in this section:
Chapter 3 outline 3.1 transport-layer services
Congestion Control and AQM
Chapter 6 Congestion Avoidance
Queue Management Jennifer Rexford COS 461: Computer Networks
Congestion Control: The Role of the Routers
Router-Assisted Congestion Control
CONGESTION CONTROL.
EE 122: Router Support for Congestion Control: RED and Fair Queueing
Lecture 19 – TCP Performance
Queuing and Queue Management
COMP/ELEC 429/556 Introduction to Computer Networks
Random Early Detection Gateways for Congestion Avoidance
Other Methods of Dealing with Congestion
Advanced Computer Networks
Other Methods of Dealing with Congestion
COS 461: Computer Networks
COMP/ELEC 429/556 Introduction to Computer Networks
COMP/ELEC 429 Introduction to Computer Networks
EECS 122: Introduction to Computer Networks TCP Variations
TCP Congestion Control
EE 122: Congestion Control The Sequel
Computer Science Division
Transport Layer: Congestion Control
TCP flow and congestion control
Presentation transcript:

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 permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang

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

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University3 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 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 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)

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University4 Why Bad for Short Lived Flows? Typical Web transfer ~ 10 KB That translates into ~ 10 packets That is a Web transfer is typically finished before slow-start is finished probing for bandwidth Moreover, a small number of packet loss among 10 packets can be blow up the overall transfer time by a large amount –Potentially timeout, retransmit, etc –Transfer time is small, so any delay is very significant

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University5 Many Experimental Ideas Out There We’ll discuss a few Smoothing transmission rate –Equation-based congestion control Router assisted mechanisms: –Random Early Detection (RED) –Explicit Congestion Notification (ECN) Idea similar to DECbit scheme in Peterson & Davie

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University6 Smoothing Transmission Rate TCP has saw tooth behavior, not smooth If we can calculate the average rate, then we can just transmit smoothly at the average rate Time W W/2

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University7 TCP Model Derive an expression for the steady state throughput as a function of –RTT –Loss probability Assumptions –Each packet dropped with iid probability p Methodology: analyze “average” cycle in steady state –How many packets are transmitted per cycle? –What is the duration of a cycle?

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University8 TCP Model Note role of RTT. Is it “fair”? A “macroscopic” model Achieving this throughput is referred to as “TCP Friendly”

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University9 Equation-Based CC Idea: –Forget complicated increase/decrease algorithms –Use this equation T(p) directly! Approach: –measure drop rate (don’t need ACKs for this) –send drop rate p to source –source sends at rate T(p) Good for streaming audio/video that can’t tolerate the high variability of TCP’s sending rate

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University10 Question! Why use the TCP equation? Why not use any equation for T(p)?

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University11 What can routers do to help?

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University12 Traditional Role of Router Routers are in middle of action Main job is routing and forwarding But traditional routers are very passive in terms of congestion control –FIFO –Drop-tail

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University13 Explicit Congestion Notification Rather than drop packets to signal congestion, router can send an explicit signal Explicit congestion notification (ECN): –Mechanism kicks in before buffer is completely full –When router is congested and buffer is filling up, instead of optionally dropping packet to signal congestion, router sets a bit in the packet header –If data packet has bit set, then ACK has ECN bit set Backward compatibility: –bit in header indicates if host implements ECN –note that not all routers need to implement ECN

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University14 Picture W W/2 AB

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University15 Lossy Links TCP assumes that all losses are due to congestion What happens when the link is lossy due to packet corruption (e.g. wireless)? Recall that Tput ~ 1/sqrt(p) where p is loss prob. –This applies even for non-congestion losses

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University16 Example p = 0 p = 1% p = 10%

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University17 ECN Advantages No need for retransmitting ECN marked packets –Contrast to dropping packet to signal congestion No confusion between congestion losses and corruption losses RED (to be discussed) with ECN works much better than RED alone for short lived flows (e.g. Web transfers)

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University18 FIFO: First-In First-Out Maintain a queue to store all packets Send packet at the head of the queue Queued packets Arriving packet Next to transmit

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University19 Tail-drop Buffer Management Drop packets only when buffer is full Drop arriving packet Arriving packet Next to transmit Drop

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University20 Ways Routers Can Help Congestion Control Packet scheduling: non-FIFO scheduling –Weighted Fair Queuing (discussed before) –Needs classification, per flow queuing, and scheduling –Can guarantee fairness –Quite complex Packet dropping: –not drop-tail –not only when buffer is full Congestion signaling

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University21 Question! Why not use “infinite” buffers? –no packet drops! Right??

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University22 Buffer Size Small buffers: –often drop packets due to bursts –but have small delays Large buffers: –reduce number of packet drops (due to bursts) –but increase delays Can we have the best of both worlds?

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University23 Random Early Detection (RED) Basic premise: –router should signal congestion when the queue first starts building up (by dropping a packet) –but router should give flows time to reduce their sending rates before dropping more packets –Note: when RED is coupled with ECN, the router can simply mark a packet instead of dropping it Therefore, packet drops (or ECN) should be: –early: don’t wait for queue to overflow –random: don’t drop (or mark) all packets in burst, but space drops (markings) out

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University24 RED FIFO scheduling Buffer management: –Probabilistically discard (or ECN mark) packets –Probability is computed as a function of average queue length (why average?) Discard Probability Average Queue Length 0 1 min_thmax_th queue_len

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University25 Average vs Instantaneous Queue

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University26 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 Average Queue Length 0 1 min_thmax_th queue_len

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University27 RED (cont’d) If (avg_len < min_th)  enqueue packet If (avg_len > max_th)  drop (or ECN mark) packet If (avg_len >= min_th and avg_len < max_th)  discard (or ECN mark) packet with probability P Discard Probability (P) Average Queue Length 0 1 min_thmax_th queue_len

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University28 RED (cont’d) P = max_P*(avg_len – min_th)/(max_th – min_th) Improvements to spread the drops (or ECN markings) (see textbook) Discard Probability Average Queue Length 0 1 min_thmax_th queue_len avg_len P max_P

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University29 RED Summary Basic idea is sound, but does not always work well –Basically, dropping packets, early or late is a bad thing –So must couple with ECN to mark packets instead of dropping packets Turns out RED does not work well for short lived flows like Web traffic (which is a big share of traffic on Internet) –Dropping packets in an already short lived flow is devastating –ECN must be used to make it work well Achieves high network utilization with low delays when flows are long lived Average queue length small, but capable of absorbing large bursts Many refinements to basic algorithm make it more adaptive (requires less tuning)

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University30 Cheating Many ways to cheat, some ideas: –increasing cwnd faster than 1 per RTT –using large initial cwnd –Opening many connections

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University31 Increasing cwnd Faster AB x DE y Limit rates: x = 2y C x y x increases by 2 per RTT y increases by 1 per RTT

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University32 Increasing cwnd Faster AB x DE y

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University33 Larger Initial cwnd AB x DE y x starts SS with cwnd = 4 y starts SS with cwnd = 1

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University34 Open Many Connections AB x DE y Assume A starts 10 connections to B D starts 1 connection to E Each connection gets about the same throughput Then A gets 10 times more throughput than D

T. S. Eugene Ngeugeneng at cs.rice.edu Rice University35 Generally, Need Stronger Router Mechanisms to Enforce Fairness (e.g. WFQ) 1 2 WFQ Scheduler flow 1 flow 2 flow n Classifier Buffer management Definition of fairness is murky with parallel connections