TCP Congestion Control Dina Katabi & Sam Madden nms.csail.mit.edu/~dina 6.033, Spring 2014.

Slides:



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

TCP Variants.
Congestion Control Jennifer Rexford Advanced Computer Networks Tuesdays/Thursdays 1:30pm-2:50pm.
1 Comnet 2010 Communication Networks Recitation 9 Fairness & TCP Congestion Control.
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
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.
Advanced Computer Networking Congestion Control for High Bandwidth-Delay Product Environments (XCP Algorithm) 1.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
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
15-744: Computer Networking L-10 Congestion Control.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #7 TCP New Reno Vs. Reno.
1 Internet Networking Spring 2002 Tutorial 10 TCP NewReno.
TCP Congestion Control TCP sources change the sending rate by modifying the window size: Window = min {Advertised window, Congestion Window} In other words,
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 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control Presented by Bob Kinicki.
TCP in Heterogeneous Network Md. Ehtesamul Haque # P.
CMPE 257 Spring CMPE 257: Wireless and Mobile Networking Spring 2005 E2E Protocols (point-to-point)
L13: Sharing in network systems Dina Katabi Spring Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans.
TCP Congestion Control
Congestion Control for High Bandwidth-delay Product Networks Dina Katabi, Mark Handley, Charlie Rohrs.
Congestion Control for High Bandwidth-Delay Product Environments Dina Katabi Mark Handley Charlie Rohrs.
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.
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
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.
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.
Winter 2008CS244a Handout 71 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering.
Winter 2003CS244a Handout 71 CS492B Project #2 TCP Tutorial # Jin Hyun Ju.
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
CS 268: Lecture 5 (TCP Congestion Control) Ion Stoica February 4, 2004.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
@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
COMP 431 Internet Services & Protocols
Congestion Control.
Introduction to Congestion Control
EECS 122: Introduction to Computer Networks Congestion Control
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
TCP.
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
CS640: Introduction to Computer Networks
TCP Congestion Control
Transport Layer: Congestion Control
TCP flow and congestion control
Lecture 6, Computer Networks (198:552)
Presentation transcript:

TCP Congestion Control Dina Katabi & Sam Madden nms.csail.mit.edu/~dina 6.033, Spring 2014

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)

Congestion S1S1 S2S2 R1 D 10Mb/s 2Mb/s 100Mb/s S1S1 S2S2  Sources compete for link 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)

Objectives of Congestion Control Efficiency & Fairness  Efficiency  Maximize link utilization  Minimize queue size (i.e., delay)  Minimize packet drops  Many solutions!  (S 1 = 1 Mb/s, S 2 = 1 Mb/s) and (S 1 =1.5 Mb/s, S 2 =0.5 Mb/s) are both efficient.  Want Fairness S1S1 S2S2 R1 D 10Mb/s 2Mb/s 100Mb/s

Fairness  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 S1S1 S2S2 R1 D 9Mb/s S2S2  1 = 1Mb/s  2 = 7Mb/s  3 =  Demands  1 = 1Mb/s  2 = 4Mb/s  3 = 4Mb/s Max-min Fair Rates

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

TCP Cong. Cont.  Basic Idea:  Send a few packets. If a packet is dropped decrease rate. If no drops, increase rate  How does TCP detect drops?  Packets have sequence numbers  Receiver acks the next expected sequence number (i.e., if received 1, it acks 2 saying it is expecting 2 to arrive next. Note that TCP implementations ack bytes but for simplicity we talk about acking packets.)

TCP controls throughput via the congestion window  Congestion window is the number of outstanding packets, i.e., number of packets sender can send without waiting for an ack  TCP is window-based: sources change their sending rate by modifying the window size: “cwnd”  Avg. Throughput = (Avg. cwnd) /(Avg. RTT)  Why not changing rate directly?  Window protocols are easy to implement (no need for accurate timers, i.e., works for slow machines an sensors)

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

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

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

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

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

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

Fast Retransmit  Timeouts are too slow  When packet is dropped, receiver still acks the next in-order packet  Use 3 duplicate ACKs to indicate a drop  Why 3? When this does not work? Tweaking TCP 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 Time Congestion Window

Putting It Together Time Congestion Window Slow Start

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

Putting It Together Time Congestion Window Fast Recovery

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

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