Congestion Control in TCP

Similar documents
Congestion Control in TCP

Congestion Control in TCP

Congestion Control in TCP

Congestion Control in TCP

CSCI Topics: Internet Programming Fall 2008

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

Transport Layer Congestion Control

TCP Congestion Control

Congestion Control 3/16/09

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Mid Term Exam Results

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Computer Networking Introduction

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

The Transport Layer Congestion control in TCP

Chapter III: Transport Layer

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

Chapter 3 Transport Layer

ADVANCED COMPUTER NETWORKS

TCP congestion control:

Lecture 8. TCP/IP Transport Layer (2)

CS321: Computer Networks Congestion Control in TCP

CSCD 330 Network Programming Winter 2015

Flow and Congestion Control Marcos Vieira

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

Lecture 15: Transport Layer Congestion Control

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

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

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

The Transport Layer: TCP & Congestion Control

Congestion Control in TCP

TCP Congestion Control

TCP Congestion Control

Congestion Control. Principles of Congestion Control. Network-assisted Congestion Control: ATM. Congestion Control. Computer Networks 10/21/2009

Principles of congestion control

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

TCP Congestion Control 65KB W

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

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

Congestion Control. Principles of Congestion Control. Network assisted congestion. Asynchronous Transfer Mode. Computer Networks 10/23/2013

Chapter 3- parte B outline

Advanced Computer Networks

8. TCP Congestion Control

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

CNT 6885 Network Review on Transport Layer

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

CSCI Topics: Internet Programming Fall 2008

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

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

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

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

CSC 4900 Computer Networks: TCP

Computer Networks Spring 2017 Homework 2 Due by 3/2/2017, 10:30am

Exercises TCP/IP Networking With Solutions

6.3 TCP congestion control 499

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

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

Flow and Congestion Control (Hosts)

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

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

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

CS4700/CS5700 Fundamentals of Computer Networks

Congestion / Flow Control in TCP

Congestion Control. Resource allocation and congestion control problem

TCP Congestion Control

Review Questions for Midterm Exam-2 Fall 2016

a) Adding the two bytes gives Taking the one s complement gives

CS3600 SYSTEMS AND NETWORKS

Flow Control, and Congestion Control

Fall 2012: FCM 708 Bridge Foundation I

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

Homework 3 50 points. 1. Computing TCP's RTT and timeout values (10 points)

Advanced Computer Networks

Investigating the Use of Synchronized Clocks in TCP Congestion Control

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

image 3.8 KB Figure 1.6: Example Web Page

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

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

Lecture 11. Transport Layer (cont d) Transport Layer 1

Chapter 3 Review Questions

Data Link Control Protocols

Transmission Control Protocol (TCP)

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Detecting half-open connections. Observed TCP problems

Congestion Control. Tom Anderson

CSE 473 Introduction to Computer Networks. Exam 2. Your name here: 11/7/2012

CSCD 330 Network Programming Spring 2018 Lecture 11a Transport Layer

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

CC451 Computer Networks

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

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

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

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

Congestion control in TCP

Problem 7. Problem 8. Problem 9

CMPSCI 453 Fall Midterm 10/26/2008

Transport Protocols and TCP: Review

Transcription:

Congestion Control in TCP Antonio Carzaniga Faculty of Informatics University of Lugano May 6, 2005

Outline Intro to congestion control Input rate vs. output throughput Congestion window Congestion avoidance Slow start Fast recovery

Understanding Congestion A router behaves a lot like a kitchen sink max throughput T

Understanding Congestion A router behaves a lot like a kitchen sink λ 1 = T /2 max throughput T throughput = T /2

Understanding Congestion A router behaves a lot like a kitchen sink λ 1 = T /2 λ 2 = T /2 max throughput T throughput = T

Understanding Congestion A router behaves a lot like a kitchen sink λ 3 = T /2 λ 1 = T /2 λ 2 = T /2 max throughput T throughput = T

Understanding Congestion A router behaves a lot like a kitchen sink λ 3 = T /2 λ 1 = T /2 λ 2 = T /2 max throughput T throughput = T

Understanding Congestion A router behaves a lot like a kitchen sink λ 3 = T /2 λ 1 = T /2 λ 2 = T /2 max throughput T throughput = T

Understanding Congestion A router behaves a lot like a kitchen sink λ 3 = T /2 λ 1 = T /2 λ 2 = T /2 max throughput T throughput = T

Understanding Congestion A router behaves a lot like a kitchen sink λ 3 = T /2 λ 1 = T /2 λ 2 = T /2 max throughput T throughput = T

Queuing Delay

Queuing Delay Total latency is the sum of link latency, processing time, and the time that a packet spends in the input queue where q = q /T L = TX + CPU + q

Queuing Delay Total latency is the sum of link latency, processing time, and the time that a packet spends in the input queue where q = q /T L = TX + CPU + q Ideal case: constant input data rate λ in < T In this case the q = 0, because q = 0

Queuing Delay Total latency is the sum of link latency, processing time, and the time that a packet spends in the input queue where q = q /T L = TX + CPU + q Ideal case: constant input data rate λ in < T In this case the q = 0, because q = 0 Extreme case: constant input data rate λ in > T In this case q = (λ in T )t and therefore q = λ in T T t

Queuing Delay

Queuing Delay q λ in T ideal input flow λ in constant

Queuing Delay q q λ in T ideal input flow λ in constant λ in T λ in variable realistic input flow

Queuing Delay q q λ in T ideal input flow λ in constant λ in T λ in variable realistic input flow Conclusion: as the input rate λ in approaches the maximum throughput T, packets will experience very long delays

More Realistic Performance

More Realistic Performance More realistic assumptions and models finite queue length (buffers) in routers effects of retransmission overhead

More Realistic Performance More realistic assumptions and models finite queue length (buffers) in routers effects of retransmission overhead T λ out λ in

Congestion Control in TCP

Congestion Control in TCP Approach: the sender limits its output rate according to the status of the network

Congestion Control in TCP Approach: the sender limits its output rate according to the status of the network Issues

Congestion Control in TCP Approach: the sender limits its output rate according to the status of the network Issues how does the sender effectively limit its output rate?

Congestion Control in TCP Approach: the sender limits its output rate according to the status of the network Issues how does the sender effectively limit its output rate? how does the sender measure the status of the network? i.e., how does the sender detect congestion

Congestion Control in TCP Approach: the sender limits its output rate according to the status of the network Issues how does the sender effectively limit its output rate? how does the sender measure the status of the network? i.e., how does the sender detect congestion how should the sender modulate its output rate? i.e., what algorithm should the sender use to decrease or increase its output rate?

Congestion Window The sender maintains a congestion window

Congestion Window The sender maintains a congestion window The congestion windows limits the amount of bytes that the sender pushes into the network before blocking waiting for acknowledgments where LastByteSent LastByteAcked W W = min (CongestionWindow, ReceiverWindow)

Congestion Window The sender maintains a congestion window The congestion windows limits the amount of bytes that the sender pushes into the network before blocking waiting for acknowledgments where LastByteSent LastByteAcked W W = min (CongestionWindow, ReceiverWindow) The resulting maximum output rate is roughly λ = W 2L

Detecting Congestion

Detecting Congestion If all traffic is correctly acknowledged, then the sender assumes (quite correctly) that there is no congestion

Detecting Congestion If all traffic is correctly acknowledged, then the sender assumes (quite correctly) that there is no congestion The main effect of congestion is that one or more router buffers between the sender and the receiver will overflow. The visible effect is that some segments will be dropped

Detecting Congestion If all traffic is correctly acknowledged, then the sender assumes (quite correctly) that there is no congestion The main effect of congestion is that one or more router buffers between the sender and the receiver will overflow. The visible effect is that some segments will be dropped Therefore the server assumes that the network is congested when it times out on some packets, or when the receiver signals the equivalent of a negative acknowledgment, by acknowledging a packet multiple times

Congestion Control How does TCP increase or decrease its output rate?

Congestion Control How does TCP increase or decrease its output rate? Additive-increase and multiplicative-decrease

Congestion Control How does TCP increase or decrease its output rate? Additive-increase and multiplicative-decrease Slow start

Congestion Control How does TCP increase or decrease its output rate? Additive-increase and multiplicative-decrease Slow start Reaction to timeout events

Additive-Increase/Multiplicative-Decrease

Additive-Increase/Multiplicative-Decrease How W is reduced: at every loss event, TCP halves the congestion window

Additive-Increase/Multiplicative-Decrease How W is reduced: at every loss event, TCP halves the congestion window e.g., suppose the window size W is currently 20Kb, and a loss is detected TCP reduces W to 10Kb

Additive-Increase/Multiplicative-Decrease How W is reduced: at every loss event, TCP halves the congestion window e.g., suppose the window size W is currently 20Kb, and a loss is detected TCP reduces W to 10Kb How W is increased: at every (good) acknowledgment, TCP increments W by 1MSS/W, so as to increase W by MSS every round-trip time 2L. This process is called congestion avoidance

Additive-Increase/Multiplicative-Decrease How W is reduced: at every loss event, TCP halves the congestion window e.g., suppose the window size W is currently 20Kb, and a loss is detected TCP reduces W to 10Kb How W is increased: at every (good) acknowledgment, TCP increments W by 1MSS/W, so as to increase W by MSS every round-trip time 2L. This process is called congestion avoidance e.g., suppose W = 14600 and MSS = 1460, then the sender increases W to 16060 after 10 acknowledgments acknowledgments

Additive-Increase/Multiplicative-Decrease Window size W over time W Time

Slow Start What is the initial value of W?

Slow Start What is the initial value of W? The initial value of W is MSS, which is quite low for modern networks

Slow Start What is the initial value of W? The initial value of W is MSS, which is quite low for modern networks In order to get quickly to a good throughput level, TCP increases its sending rate exponentially for its first growth phase

Slow Start What is the initial value of W? The initial value of W is MSS, which is quite low for modern networks In order to get quickly to a good throughput level, TCP increases its sending rate exponentially for its first growth phase After experiencing the first loss, TCP cuts W in half and proceeds with its linear push

Slow Start What is the initial value of W? The initial value of W is MSS, which is quite low for modern networks In order to get quickly to a good throughput level, TCP increases its sending rate exponentially for its first growth phase After experiencing the first loss, TCP cuts W in half and proceeds with its linear push This process is called slow start, because of the small initial value of W

Timeouts vs. NACKs As we know, a TCP receiver implements NACKs by sending three duplicate ACKs

Timeouts vs. NACKs As we know, a TCP receiver implements NACKs by sending three duplicate ACKs Both timeouts and NACKs signal a loss, but they say different things about the status of the network

Timeouts vs. NACKs As we know, a TCP receiver implements NACKs by sending three duplicate ACKs Both timeouts and NACKs signal a loss, but they say different things about the status of the network A timeout indicates congestion, while the receipt of three (duplicate) ACKs suggests that the network is still able to deliver segments along that path

Timeouts vs. NACKs As we know, a TCP receiver implements NACKs by sending three duplicate ACKs Both timeouts and NACKs signal a loss, but they say different things about the status of the network A timeout indicates congestion, while the receipt of three (duplicate) ACKs suggests that the network is still able to deliver segments along that path So, TCP reacts differently to a timeout and to a triple duplicate ACKs

Timeouts vs. NACKs Assuming the current window size is W = W

Timeouts vs. NACKs Assuming the current window size is W = W Timeout go back to W = MSS run slow start until W reaches W /2 then proceed with congestion avoidance

Timeouts vs. NACKs Assuming the current window size is W = W Timeout go back to W = MSS run slow start until W reaches W /2 then proceed with congestion avoidance NACK cut W in half: W = W /2 run congestion avoidance, ramping up W linearly This is called fast recovery

Sender Behavior W Time

Sender Behavior SS CA SS CA CA CA NACK W NACK timeout NACK Time