TCP Congestion Control

Similar documents
6.033 Computer System Engineering

Flow & Congestion Control

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

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

Lecture 15: Transport Layer Congestion Control

Computer Networking

CS3600 SYSTEMS AND NETWORKS

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

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

Chapter III: Transport Layer

Communication Networks

15-744: Computer Networking TCP

CS244a: An Introduction to Computer Networks

CS4700/CS5700 Fundamentals of Computer Networks

Lecture 14: Congestion Control"

Chapter 3 Transport Layer

Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse

image 3.8 KB Figure 1.6: Example Web Page

TCP congestion control:

Computer Networking Introduction

Congestion Control End Hosts. CSE 561 Lecture 7, Spring David Wetherall. How fast should the sender transmit data?

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

Congestion Control. Tom Anderson

Lecture 14: Congestion Control"

Principles of congestion control

Mid Term Exam Results

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

CSE 123A Computer Networks

Reliable Transport II: TCP and Congestion Control

Congestion Control for High Bandwidth-delay Product Networks

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

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

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

Bandwidth Allocation & TCP

Chapter 3 Transport Layer

Advanced Computer Networks

6.033 Computer System Engineering

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

Lecture 15: TCP over wireless networks. Mythili Vutukuru CS 653 Spring 2014 March 13, Thursday

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

Goals of Today s Lecture! Congestion Control! Course So Far.! Congestion Control Overview! It s Not Just The Sender & Receiver! Congestion is Natural!

CSC 4900 Computer Networks: TCP

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Congestion Control for High Bandwidth-delay Product Networks. Dina Katabi, Mark Handley, Charlie Rohrs

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

Exercises TCP/IP Networking With Solutions

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

Detecting half-open connections. Observed TCP problems

Internet Networking recitation #10 TCP New Reno Vs. Reno

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CSE 461. TCP and network congestion

cs/ee 143 Communication Networks

ADVANCED COMPUTER NETWORKS

6.033 Spring 2015 Lecture #11: Transport Layer Congestion Control Hari Balakrishnan Scribed by Qian Long

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

CS321: Computer Networks Congestion Control in TCP

ADVANCED TOPICS FOR CONGESTION CONTROL

6.033 Lecture 12 3/16/09. Last time: network layer -- how to deliver a packet across a network of multiple links

Congestion Control in TCP

CS644 Advanced Networks

TCP Congestion Control 65KB W

COMP/ELEC 429/556 Introduction to Computer Networks

Hybrid Control and Switched Systems. Lecture #17 Hybrid Systems Modeling of Communication Networks

TCP Congestion Control

TCP Congestion Control

Performance Consequences of Partial RED Deployment

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

Chapter 3 Transport Layer

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

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 30, 2018

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

8. TCP Congestion Control

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

The Transport Layer Congestion control in TCP

CSCI Topics: Internet Programming Fall 2008

Flow and Congestion Control Marcos Vieira

Congestion Control. Brighten Godfrey CS 538 January Based in part on slides by Ion Stoica

Advanced Computer Networks

Reliable Transport II: TCP and Congestion Control

CSE 473 Introduction to Computer Networks. Midterm Exam Review

CS4700/CS5700 Fundamentals of Computer Networks

CSE/EE 461 Lecture 16 TCP Congestion Control. TCP Congestion Control

Contents. CIS 632 / EEC 687 Mobile Computing. TCP in Fixed Networks. Prof. Chansu Yu

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

Wireless TCP Performance Issues

CSC 8560 Computer Networks: TCP

CSCI Topics: Internet Programming Fall 2008

Improving the Robustness of TCP to Non-Congestion Events

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

Transport Layer Congestion Control

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

CS268: Beyond TCP Congestion Control

Outline. Internet. Router. Network Model. Internet Protocol (IP) Design Principles

L12: end to end layer

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

TCP Congestion Control

CMPE 257: Wireless and Mobile Networking

Transcription:

6.033, Spring 2014 TCP Congestion Control Dina Katabi & Sam Madden 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)

Congestion S 1 10Mb/s R1 D 2Mb/s S 2 100Mb/s 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) S 1 S 2

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. S 1 10Mb/s R1 D 2Mb/s S 2 100Mb/s Want Fairness

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 S 1 S 2 R1 D 9Mb/s S 2 Demands 1 = 1Mb/s 2 = 7Mb/s 3 = Max-min Fair Rates 1 = 1Mb/s 2 = 4Mb/s 3 = 4Mb/s

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

Basic Idea: TCP Cong. Cont. 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 Src cwnd = 1 cwnd += 1 cwnd = 2 cwnd = 3 cwnd = 4 D A D D A A D D D A A A Dest Actually, On ack arrival: cwnd = cwnd + 1/cwnd On timeout: cwnd = cwnd /2

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

TCP AIMD Congestion Window Timeout because of a packet loss correct cwnd Halve Congestion Window (and Rate) Grab back Bandwidth 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 Src 1 2 4 8 D A D D A A D D D D A A A A A A A A Dest

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

Tweaking TCP 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? 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 Slow Start Time

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

Putting It Together Congestion Window Fast Recovery Time

TCP Steady-State Throughput as Function of Loss Rate 2 2 1 Wm Wm 1 drop every pkt so, drop rate is: p 2 2 2 2 3W m 8 Throughput is the packets sent divided by the time it took to send them 3W m 4RTT W(t) W m 1 drop From the two eq. 3/ RTT 2 p W m /2 RTT * W m /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