Congestion Control. Queuing Discipline Reacting to Congestion Avoiding Congestion. Issues

Similar documents
CS CS COMPUTER NETWORKS CS CS CHAPTER 6. CHAPTER 6 Congestion Control

TCP Congestion Control. Housekeeping. Additive Increase/Multiplicative Decrease. AIMD (cont) Pick up folders for exam study Exam next Friday, Nov.

Congestion Control 3/16/09

Congestion Control. Resource allocation and congestion control problem

Congestion. Can t sustain input rate > output rate Issues: - Avoid congestion - Control congestion - Prioritize who gets limited resources

Congestion Control & Resource Allocation. Issues in Resource Allocation Queuing Discipline TCP Congestion Control

Chapter 6 Congestion Avoidance. Networking CS 3470, Section 1

Chapter 6 Congestion Control and Resource Allocation

What is Congestion? Congestion: Moral of the Story. TCP Approach. Transport Layer: TCP Congestion Control & Buffer Management

TCP Congestion Control. Lecture 16. Outline. TCP Congestion Control. Additive Increase / Multiplicative Decrease (AIMD)

Congestion Control in TCP

CS 356: Computer Network Architectures Lecture 19: Congestion Avoidance Chap. 6.4 and related papers. Xiaowei Yang

ADVANCED COMPUTER NETWORKS

CS/ECE 438: Communication Networks Spring Problem Set 7. Title: Congestion control and Performance Analysis

TCP Congestion Control

C 6. Congestion Control and Resource Allocation. Copyright 2010, Elsevier Inc. All rights Reserved

UNIT IV. UDP TCP Adaptive Flow Control-Adaptive Retransmission Congestion Control Congestion avoidance QoS.

Lecture 14: Congestion Control"

514 CHAPTER 6 Congestion control and resource allocation

Computer Networking Introduction

CSCI-1680 Transport Layer III Congestion Control Strikes Back Rodrigo Fonseca

CS321: Computer Networks Congestion Control in TCP

Bandwidth Allocation & TCP

Congestion Avoidance

Chapter III: Transport Layer

Lecture 14: Congestion Control"

6.3 TCP congestion control 499

Congestion Control in TCP

Congestion Control in TCP

Introduc)on to Computer Networks

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

Overview. Administrivia. Congestion Control Revisited. Congestion at Router. Example: FIFO tail drop. Router design issues

CSCI Topics: Internet Programming Fall 2008

Mid Term Exam Results

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Chapter 3 Transport Layer

The Transport Layer Congestion control in TCP

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

End-to-End Protocols. Transport Protocols. User Datagram Protocol (UDP) Application Layer Expectations

Congestion Control. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Flow and Congestion Control (Hosts)

TCP Congestion Control : Computer Networking. Introduction to TCP. Key Things You Should Know Already. Congestion Control RED

8. TCP Congestion Control

Chapter 3 Transport Layer

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

CS3600 SYSTEMS AND NETWORKS

CS Transport. Outline. Window Flow Control. Window Flow Control

Congestion control in TCP

Computer Networks. Course Reference Model. Topic. Congestion What s the hold up? Nature of Congestion. Nature of Congestion 1/5/2015.

CS4700/CS5700 Fundamentals of Computer Networks

Congestion Control & Resource Allocation

Flow and Congestion Control Marcos Vieira

TCP congestion control:

Congestion Control and Resource Allocation

Assignment 7: TCP and Congestion Control Due the week of October 29/30, 2015

Internet Protocols Fall Lecture 16 TCP Flavors, RED, ECN Andreas Terzis

Lecture 8. TCP/IP Transport Layer (2)

Reminders. - Open book, open notes, closed laptop - Bring textbook - Bring printouts of slides & any notes you may have taken

Chapter 3 Transport Layer

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 10

CS557: Queue Management

Chapter 3 Transport Layer

Recap. TCP connection setup/teardown Sliding window, flow control Retransmission timeouts Fairness, max-min fairness AIMD achieves max-min fairness

Lecture 21. Reminders: Homework 6 due today, Programming Project 4 due on Thursday Questions? Current event: BGP router glitch on Nov.

CSC 4900 Computer Networks: TCP

Lecture 21: Congestion Control" CSE 123: Computer Networks Alex C. Snoeren

Congestion Control in TCP

UNIT IV -- TRANSPORT LAYER

CS519: Computer Networks. Lecture 5, Part 4: Mar 29, 2004 Transport: TCP congestion control

CS551 Router Queue Management

TCP Congestion Control

TCP Congestion Control

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

Lecture 15: Transport Layer Congestion Control

image 3.8 KB Figure 1.6: Example Web Page

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

Transmission Control Protocol (TCP)

Fall 2012: FCM 708 Bridge Foundation I

TCP Congestion Control 65KB W

Chapter 24 Congestion Control and Quality of Service 24.1

Chapter 3- parte B outline

Congestion Control in TCP

Wireless TCP Performance Issues

CNT 6885 Network Review on Transport Layer

Transport Layer Congestion Control

Principles of congestion control

CSE 123A Computer Networks

Problem 7. Problem 8. Problem 9

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

Flow and Congestion Control

Computer Networking. Queue Management and Quality of Service (QOS)

Congestion Control. Tom Anderson

Flow Control. Flow control problem. Other considerations. Where?

15-744: Computer Networking. Overview. Queuing Disciplines. TCP & Routers. L-6 TCP & Routers

CSCD 330 Network Programming Winter 2015

Multiple unconnected networks

15-744: Computer Networking TCP

Reliable Transport II: TCP and Congestion Control

Transcription:

Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion Issues Two sides of the same coin pre-allocate resources to avoid congestion (e.g. telephone networks) control congestion if (and when) it occurs Source -Mbps Ethernet Source 2 0-Mbps FDDI Router.5-Mbps T link Destination Two points of implementation hosts at the edges of the network (transport protocol) routers inside the network (queuing discipline) Underlying service model best-effort (assume for now) multiple qualities of service (later) 2

Framework Connectionless Networks sequence of packets sent between source/destination pair soft state at the routers vs. no state, and hard state Does not affect correct routing, but may improve performance Source Router Destination Source 2 Router Router Destination 2 Source 3 Taxonomy router-centric versus host-centric reservation-based versus feedback-based window-based versus rate-based 3 Evaluation Throughput Goodput Fairness FairnessIndex n i= = n n throughputi i= throughput 2 2 i Queuing Delay 4 2

Queuing Discipline First-In-First-Out (FIFO) does not discriminate between traffic sources Fair Queuing (FQ) A separate flow for each flow. Router serves these queues in a round-robin manner ensures no flow achieves less than its share of capacity More if some other flows are not backlogged (no packet to send) Problem The smaller service unit is packet Flow Flows may have different packet sizes How to approximate bit-by-bit RR? Flow 2 Round-robin service Flow 3 Flow 4 5 FQ Algorithm Suppose FQ Clock ticks after each round, during which one bit from each backlogged flow is transmitted P i the length of packet i S i the time when start to transmit packet i F i the time when finish transmitting packet i F i = S i + P i When does router start transmitting packet i? if before router finished packet i - from this flow, then immediately after last bit of i - (F i- ) if no current packets for this flow, then start transmitting when arrives (call this A i ) Thus: F i = MAX (F i -, A i ) + P i 6 3

FQ Algorithm (cont) For multiple flows Maintain FQ clock vs. real time. k k (number of active flows) varies with time active flows may become idle; new flows may join calculate F i for each packet that arrives on each flow treat all F i s as timestamps next packet to transmit is one with lowest timestamp Not perfect: can t preempt current packet Flow Flow 2 Output dfqc dt = Flow (arriving) : trans. time of bit Flow 2 (transmitting) Output F = 8 F = F = F = 5 F = 2 (a) shorter packets are sent first (b) no pre-emption 7 Idea TCP Congestion Control assumes best-effort network (FIFO or FQ routers) each source determines network capacity for itself uses implicit feedback ACKs pace transmission (self-clocking) Challenge determining the available bandwidth (fair-share) adjusting to changes in the available capacity 8 4

Additive Increase/Multiplicative Decrease Objective: adjust to changes in the available capacity New state variable per connection: CongestionWindow limits how much data source has in transit MaxWin = MIN(CongestionWindow, AdvertisedWindow) EffWin = MaxWin - (LastByteSent - LastByteAcked) Idea: increase CongestionWindow when congestion goes down decrease CongestionWindow when congestion goes up 9 AIMD (cont) Question: how does the source determine whether or not the network is congested? Answer: a timeout occurs timeout signals that a packet was lost packets are seldom lost due to transmission error lost packet implies congestion 5

AIMD (cont) Algorithm increment CongestionWindow by one packet per RTT (linear increase) divide CongestionWindow by two whenever a timeout occurs (multiplicative decrease) Source Destination In practice: increment a little for each ACK Assume each ACK acknowledges MSS amount of data Increment = MSS * (MSS/CongestionWindow) CongestionWindow += Increment AIMD (cont) Trace: sawtooth behavior 70 60 50 40 30 20.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0.0 2 6

Slow Start Objective: quickly determine the available capacity in the first Idea: begin with CongestionWindow = packet double CongestionWindow each RTT (increment by packet for each ACK) Source Destination 3 Slow Start (cont) Exponential growth, but slower than all at once Used when first starting connection when connection goes dead waiting for timeout Trace 70 60 50 40 30 20.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Problem: lose up to half a CongestionWindow s worth of data 4 7

Fast Retransmit and Fast Recovery Problem: coarse-grain TCP timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission Sender Packet Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Retransmit packet 3 Receiver ACK ACK 2 ACK 2 ACK 2 ACK 2 ACK 6 5 70 60 50 40 30 20 Results.0 2.0 3.0 4.0 5.0 6.0 7.0 Fast recovery skip the slow start phase go directly to half the last successful CongestionWindow (ssthresh) 6 8

Congestion Avoidance TCP s strategy control congestion once it happens repeatedly increase load in an effort to find the point at which congestion occurs, and then back off Alternative strategy predict when congestion is about to happen reduce rate before packets start being discarded call this congestion avoidance, instead of congestion control Two possibilities router-centric: DECbit and RED Gateways host-centric: TCP Vegas 7 DECbit Add binary congestion bit to each packet header Router monitors average queue length over last busy+idle cycle ueue length Current time Previous cycle Averaging interval Current cycle Time set congestion bit if average queue length > attempts to balance throughout against delay 8 9

End Hosts Destination echoes bit back to source Source records how many packets resulted in set bit If less than 50% of last window s worth had bit set increase CongestionWindow by packet If 50% or more of last window s worth had bit set decrease CongestionWindow by 0.875 times 9 Random Early Detection (RED) Notification is implicit just drop the packet (TCP will timeout) could make explicit by marking the packet Early random drop rather than wait for queue to become full, drop each arriving packet with some drop probability whenever the queue length exceeds some drop level 20

RED Details Compute average queue length AvgLen = ( - Weight) * AvgLen + Weight * SampleLen 0 < Weight < (usually 0.002) SampleLen is queue length each time a packet arrives MaxThreshold MinThreshold AvgLen 2 RED Details (cont) Two queue length thresholds if AvgLen <= MinThreshold then enqueue the packet if MinThreshold < AvgLen < MaxThreshold then calculate probability P drop arriving packet with probability P if ManThreshold <= AvgLen then drop arriving packet 22

RED Details (cont) Computing probability P TempP = MaxP * (AvgLen - MinThreshold)/ (MaxThreshold - MinThreshold) P = TempP/( - count * TempP) Drop Probability Curve P(drop).0 axp MinThresh MaxThresh AvgLen 23 Tuning RED Probability of dropping a particular flow s packet(s) is roughly proportional to the share of the bandwidth that flow is currently getting MaxP is typically set to 0.02, meaning that when the average queue size is halfway between the two thresholds, the gateway drops roughly one out of 50 packets. If traffic is bursty, then MinThreshold should be sufficiently large to allow link utilization to be maintained at an acceptably high level Difference between two thresholds should be larger than the typical increase in the calculated average queue length in one RTT; setting MaxThreshold to twice MinThreshold is reasonable for traffic on today s Internet 24 2

TCP Vegas Idea: source watches for some sign that router s queue is building up and congestion will happen too; e.g., RTT grows sending rate flattens 70 60 50 40 30 20 0.5.0.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 0 900 700 500 300 0 0.5.0.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 5 0.5.0.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 25 Algorithm Let BaseRTT be the minimum of all measured RTTs (commonly the RTT of the first packet) If not overflowing the connection, then ExpectRate = CongestionWindow/BaseRTT Source calculates sending rate (ActualRate) once per RTT Source compares ActualRate with ExpectRate Diff = ExpectedRate - ActualRate if Diff < α increase CongestionWindow linearly else if Diff > β decrease CongestionWindow linearly else leave CongestionWindow unchanged 26 3

Algorithm (cont) Parameters α = packet β = 3 packets 70 60 50 40 30 20 0.5.0.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 240 200 60 20 80 40 0.5.0.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 Even faster retransmit keep fine-grained timestamps for each packet check for timeout on first duplicate ACK 27 4