TCP Congestion Control

Slides:



Advertisements
Similar presentations
Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.
Advertisements

TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.
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.
CS640: Introduction to Computer Networks Mozafar Bag-Mohammadi Lecture 3 TCP Congestion Control.
Computer Networking Lecture 17 – TCP & Congestion Control Dejian Ye, Liu Xin.
Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
15-744: Computer Networking L-10 Congestion Control.
1 TCP Transport Control Protocol Reliable In-order delivery Flow control Responds to congestion “Nice” Protocol.
Computer Networking Lecture 16 – TCP & Congestion Control Copyright ©, Carnegie Mellon University.
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.
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.
TCP Congestion Control
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.
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
Lecture 9 – More TCP & Congestion Control
What is TCP? Connection-oriented reliable transfer Stream paradigm
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.
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.
Winter 2008CS244a Handout 71 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering.
Advance Computer Networks Lecture#09 & 10 Instructor: Engr. Muhammad Mateen Yaqoob.
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.
Peer-to-Peer Networks 13 Internet – The Underlay Network
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP Congestion Control.
CS 268: Lecture 5 (TCP Congestion Control) Ion Stoica February 4, 2004.
@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.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Internet Networking recitation #9
Transport Layer CS 381 3/7/2017.
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
COMP 431 Internet Services & Protocols
Congestion Control.
Introduction to Congestion Control
EECS 122: Introduction to Computer Networks Congestion Control
TCP Vegas: New Techniques for Congestion Detection and Avoidance
Congestion Control: The Role of the Routers
Chapter 3 outline 3.1 Transport-layer services
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Flow and Congestion Control
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.
CS 268: Lecture 4 (TCP Congestion Control)
Chapter 6 TCP Congestion Control
COMP/ELEC 429/556 Introduction to Computer Networks
Jiyong Park Seoul National University, Korea
CS640: Introduction to Computer Networks
Internet Networking recitation #10
If both sources send full windows, we may get congestion collapse
Administrivia Review 1 Office hours moving to Thursday 10—12
Congestion Control Reasons:
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP flow and congestion control
Chapter 3 Transport Layer
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Congestion Michael Freedman COS 461: Computer Networks
Lecture 6, Computer Networks (198:552)
Presentation transcript:

TCP Congestion Control 6.033, Spring 2013 TCP Congestion Control Dina Katabi nms.csail.mit.edu/~dina

Sharing the Internet How do you manage resources in a huge system like the Internet, where users with different interests share the same links? Difficult because of: Size Billions of users, links, routers Heterogeneity bandwidth: 9.6Kb/s (then modem, now cellular), 10 Tb/s latency: 50us (LAN), 133ms (wired), 1s (satellite), 260s (Mars) What are the problems? and how to solve them?

Congestion R1 Sources compete for bandwidth, and buffer space 10Mb/s 2Mb/s 100Mb/s S1 S2 Sources compete for bandwidth, and buffer space Why a problem? Sources are unaware of current state of resource Sources are unaware of each other Manifestations: Lost packets (buffer overflow at routers) Long delays (queuing in router buffers) In many situations will result in < 2 Mb/s of throughput for the above topology (congestion collapse) Model for congestion control.

Congestion Collapse Increase in input traffic leads to decrease in useful work knee cliff Throughput Latency Congestion Collapse Input traffic Many possible causes Spurious retransmissions of packets still in flight Packet consume resources and then they are dropped downstream Control Traffic

What can be done? Increase network resources Admission Control But demands will increase too! Admission Control Used in telephone networks Hard in the Internet because can’t model traffic well Congestion control: ask the sources to slow down Plausible because Internet applications are elastic But how? How do the sources learn of congestion? What is the correct sending rate? What’s the role of the sender and what is the role of the router? ========Q========= More questions about congestion control

Objectives of Cong. Cont. Efficiency Maximize link utilization Minimize queue size (i.e., delay) Minimize packet drops Many solutions! (S1= 1 Mb/s, S2= 1 Mb/s) and (S1=1.5 Mb/s, S2=0.5 Mb/s) are both efficient. Want Fairness S1 S2 R1 D 10Mb/s 2Mb/s 100Mb/s

Fairness Other measures of fairness Want controlled unfairness 9Mb/s Max-Min Fairness At each bottleneck, user gets min(user’s demand, fair share) User’s rate is the minimum max-min fair rate along the path 1= 1Mb/s 2= 7Mb/s 3=  Demands Other measures of fairness Want controlled unfairness Example (1, 7, 10) bottleneck is 9Mb/s 9/3 = 3 > R1 S1= 1Mb/s 3 < R2, R3 9-1 = 8Mb/s -> fair share 4Mb/s R2=R3=4Mb/s 1= 1Mb/s 2= 4Mb/s 3= 4Mb/s Max-min Fair Rates

2 Approaches to Congestion Control End-system congestion control Router is dumb Sender detects cong. Sender reacts E.g. TCP Network-centric cong. cont. Router help in detecting cong and deciding what to do Important Principles Distributed Stable & Robust Keep routers simple

TCP

TCP TCP provides reliability & congestion control Reliable transmission ensures the receiver’s application receives the correct and complete data sent by the sender’s application TCP recovers from lost packets, eliminates duplicates and ensures in-order packet delivery to the application Reliability was discussed in 6.02 Congestion control Sender reacts to congestion and discovers its fair and efficient send rate

End-system Cong. Cont. TCP uses a host-based approach Basic Idea: Routers are DropTail (i.e., drop packets when the queue is full) and FIFO (i.e., transmit packets from the queue in-order of their arrivals) End-systems detect congestion End-systems react to congestion Basic Idea: Send a few packets. If a packet is dropped decrease rate. If no drops, increase rate How does TCP detect drops?

TCP controls throughput via the congestion window Congestion window is the number of packets sender can send without an acknowledgement TCP is window-based: sources change their sending rate by modifying the window size: “cwnd” Throughput = cwnd /RTT Why not changing rate directly? Window provides conservation of packets at equilibrium Window protocols are easy to implement But, they are BURSTY

How much should TCP Increase/decrease? Probe for the correct sending rate Additive Increase / Multiplicative Decrease (AIMD) Every RTT: No loss: cwnd = cwnd + 1 A loss: cwnd = cwnd /2 What is a congestion window

Additive Increase Src Dest Actually, cwnd += 1 cwnd = 2 cwnd = 1 cwnd = 3 D A cwnd = 4 Src D A D A Dest Actually, On ack arrival: cwnd = cwnd + 1/cwnd On timeout: cwnd = cwnd /2

AIMD Leads to Efficiency and Fairness line (x1,x2) (bx1,bx2) (bx1+a,bx2+a) User 2: x2 Efficiency line (x1+x2 = BW) User 1: x1

TCP AIMD Congestion Window Time Timeout because of a packet loss Congestion Window correct cwnd Grab back Bandwidth Halve Congestion Window (and Rate) Time Need the queue to absorb these saw-tooth oscillations

“Slow Start” Cold start a connection at startup or after a timeout At the beginning of a connection, increase exponentially On ack arrival: cwnd += 1 1 2 4 8 Src D D A A D D D D D A A A A A A A A A Dest

Adding Slow Start Congestion Window Time Loss+Timeout AIMD Slow start stops at halve previous cwnd Exponential Increase Time

Tweaking TCP Fast Retransmit Fast Recovery Timeouts are too slow When packet is dropped, receiver still acks the last in-order packet Use 3 duplicate ACKs to indicate a drop Why 3? When this does not work? Fast Recovery If there are still ACKs coming in then no need for slow-start Divide cwnd by 2 after fast retransmit Increment cwnd by 1/cwnd for each dupack

Putting It Together Congestion Window Time

Putting It Together Congestion Window Time Slow Start

Putting It Together 3 dupacks (Fast Retransmit) Congestion Window Time

Putting It Together Congestion Window Time Fast Recovery

TCP Steady-State Throughput as Function of Loss Rate 1 drop every so, drop rate is: Throughput  is the packets sent divided by the time it took to send them W(t) 1 drop Wm Wm/2 From the two eq. RTT * Wm/2 time

Reflections on TCP The probing mechanism of TCP is based on causing congestion then detecting it Assumes that all sources cooperate Assumes flows are long enough Too bursty Vulnerable to non-congestion related loss (e.g. wireless errors) Unfair to long RTT flows

Next Lecture Should the network (i.e., the router) participate in detecting and controlling congestion? How?