Winter 2008CS244a Handout 71 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering.

Slides:



Advertisements
Similar presentations
24-1 Chapter 24. Congestion Control and Quality of Service (part 1) 23.1 Data Traffic 23.2 Congestion 23.3 Congestion Control 23.4 Two Examples.
Advertisements

1 Comnet 2010 Communication Networks Recitation 9 Fairness & TCP Congestion Control.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
TCP Congestion Control Dina Katabi & Sam Madden nms.csail.mit.edu/~dina 6.033, Spring 2014.
Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.
Introduction 1 Lecture 14 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Chapter 3 Transport Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 12.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
Congestion Control Reading: Sections COS 461: Computer Networks Spring 2011 Mike Freedman
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
1 Lecture 9: TCP and Congestion Control Slides adapted from: Congestion slides for Computer Networks: A Systems Approach (Peterson and Davis) Chapter 3.
TCP Congestion Control TCP sources change the sending rate by modifying the window size: Window = min {Advertised window, Congestion Window} In other words,
Computer Networks : TCP Congestion Control1 TCP Congestion Control.
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
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control Presented by Bob Kinicki.
L13: Sharing in network systems Dina Katabi Spring Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans.
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
Courtesy: Nick McKeown, Stanford 1 TCP Congestion Control Tahir Azim.
3: Transport Layer3b-1 Principles of Congestion Control Congestion: r informally: “too many sources sending too much data too fast for network to handle”
Transport Layer 4 2: Transport Layer 4.
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.
Congestion control for multimedia Henning Schulzrinne Dept. of Computer Science Columbia University Fall 2003.
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.
Transport Layer3-1 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles.
CS144 An Introduction to Computer Networks
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
Chapter 12 Transmission Control Protocol (TCP)
Copyright 2008 Kenneth M. Chipps Ph.D. Controlling Flow Last Update
Lecture 9 – More TCP & Congestion Control
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.
Computer Networking Lecture 18 – More TCP & Congestion Control.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
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.
Transport Layer 3- Midterm score distribution. Transport Layer 3- TCP congestion control: additive increase, multiplicative decrease Approach: increase.
Winter 2008CS244a Handout 81 CS244a: An Introduction to Computer Networks Handout 8: Congestion Avoidance and Active Queue Management Nick McKeown Professor.
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.
CS-1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Winter 2003CS244a Handout 71 CS492B Project #2 TCP Tutorial # Jin Hyun Ju.
Advance Computer Networks Lecture#09 & 10 Instructor: Engr. Muhammad Mateen Yaqoob.
The Macroscopic behavior of the TCP Congestion Avoidance Algorithm.
Handout # 14: Congestion Control
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
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.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
1 Flow & Congestion Control Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
Chapter 3 outline 3.1 Transport-layer services
Lecture 19 – TCP Performance
So far, On the networking side, we looked at mechanisms to links hosts using direct linked networks and then forming a network of these networks. We introduced.
Chapter 6 TCP Congestion Control
TCP Congestion Control
TCP Overview.
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP flow and congestion control
Congestion Michael Freedman COS 461: Computer Networks
Presentation transcript:

Winter 2008CS244a Handout 71 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering and Computer Science, Stanford University

Winter 2008CS244a Handout 72 Main points  Congestion is inevitable  Congestion happens at different scales – from two individual packets colliding to too many users  TCP Senders can detect congestion and reduce their sending rate by reducing the window size  TCP modifies the rate according to “Additive Increase, Multiplicative Decrease (AIMD)”.  To probe and find the initial rate, TCP uses a restart mechanism called “slow start”.  Routers slow down TCP senders by buffering packets and thus increasing delay

Winter 2008CS244a Handout 73 Congestion H1H1 H2H2 R1 H3H3 A 1 (t) 10Mb/s D(t) 1.5Mb/s A 2 (t) 100Mb/s A1(t)A1(t) A2(t)A2(t) X(t)X(t) D(t)D(t) A1(t)A1(t) A2(t)A2(t) D(t)D(t) X(t)X(t) Cumulative bytes t

Winter 2008CS244a Handout 74 Time Scales of Congestion Too many users using a link during a peak hour TCP flows filling up all available bandwidth Two packets colliding at a router 7:008:009:00 1s2s3s 100µs200µs300µs

Winter 2008CS244a Handout 75 Dealing with Congestion Example: two flows arriving at a router Strategy Drop one of the flows Buffer one flow until the other has departed, then send it Re-Schedule one of the two flows for a later time Ask both flows to reduce their rates R1 ? A1(t)A1(t) A2(t)A2(t)

Winter 2008CS244a Handout 76 Congestion is unavoidable Arguably it’s good!  We use packet switching because it makes efficient use of the links. Therefore, buffers in the routers are frequently occupied.  If buffers are always empty, delay is low, but our usage of the network is low.  If buffers are always occupied, delay is high, but we are using the network more efficiently.  So how much congestion is too much?

Winter 2008CS244a Handout 77 Load, delay and power Average Packet delay Load Typical behavior of queueing systems with random arrivals: Power Load A simple metric of how well the network is performing: “optimal load” Burstiness tends to move asymptote to the left

Winter 2008CS244a Handout 78 Options for Congestion Control 1. Implemented by host versus network 2. Reservation-based, versus feedback- based 3. Window-based versus rate-based.

Winter 2008CS244a Handout 79 TCP Congestion Control  TCP implements host-based, feedback- based, window-based congestion control.  TCP sources attempts to determine how much capacity is available  TCP sends packets, then reacts to observable events (loss).

Winter 2008CS244a Handout 710 TCP Congestion Control  TCP sources change the sending rate by modifying the window size: Window = min{Advertized window, Congestion Window}  In other words, send at the rate of the slowest component: network or receiver.  “cwnd” follows additive increase/multiplicative decrease  On receipt of Ack: cwnd += 1  On packet loss (timeout): cwnd *= 0.5 ReceiverTransmitter (“cwnd”)

Winter 2008CS244a Handout 711 Additive Increase D A DDAADDAADA Src Dest Actually, TCP uses bytes, not segments to count: When ACK is received:

Winter 2008CS244a Handout 712 Leads to the TCP “sawtooth” t Window halved Timeouts Could take a long time to get started!

Winter 2008CS244a Handout 713 TCP Sending Rate  What is the sending rate of TCP?  Acknowledgement for sent packet is received after one RTT  Amount of data sent until ACK is received is the current window size W  Therefore sending rate is R = W/RTT  Is the TCP sending rate saw tooth shaped as well?

Winter 2008CS244a Handout 714 TCP and buffers

Winter 2008CS244a Handout 715 TCP and Buffers  For TCP with a single flow over a network link with enough buffers, RTT and W are proportional to each other  Therefore the sending rate R = W/RTT is constant (and not a sawtooth)  But experiments and theory suggest that with many flows: Where: p is the drop probability. You’ll see this in a problem set.  TCP rate can be controlled in two ways: 1. Buffering packets and increasing the RTT 2. Dropping packets to decrease TCP’s window size

Winter 2008CS244a Handout 716 “Slow Start” Designed to find the fair-share rate quickly at startup or if a connection has been halted (e.g. window dropped to zero, or window full, but ACK is lost). How it works: increase cwnd by 1 for each ACK received. D A DDAADD AA D A Src Dest D A

Winter 2008CS244a Handout 717 Slow Start halved Timeouts Exponential “slow start” t Window Why is it called slow-start? Because TCP originally had no congestion control mechanism. The source would just start by sending a whole window’s worth of data. Slow start in operation until it reaches half of previous cwnd.

Winter 2008CS244a Handout 718 Congestion control in the Internet  Maximum window sizes of most TCP implementations by default are very small  Windows XP: 12 packets  Linux/Mac: 40 packets  Often the buffer of a link is larger than the maximum window size of TCP  A typical DSL line has 200 packets worth of buffer  For a TCP session, the maximum number of packets outstanding is 40  The buffer can never fill up  The router will never drop a packet