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

Mid Term Exam Results

Chapter 3 Transport Layer

Transport Layer Congestion Control

Congestion Control 3/16/09

Computer Networking Introduction

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

Chapter III: Transport Layer

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 3 Transport Layer

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

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

TCP Congestion Control

Chapter 3 Transport Layer

TCP congestion control:

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

CS321: Computer Networks Congestion Control in TCP

The Transport Layer: TCP & Congestion Control

The Transport Layer Congestion control in TCP

TCP Congestion Control

TCP Congestion Control

Flow and Congestion Control Marcos Vieira

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

TCP Congestion Control 65KB W

Congestion Control in TCP

Lecture 15: Transport Layer Congestion Control

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

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

ADVANCED COMPUTER NETWORKS

CSCD 330 Network Programming Winter 2015

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

Lecture 8. TCP/IP Transport Layer (2)

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

CSC 4900 Computer Networks: TCP

CSCI Topics: Internet Programming Fall 2008

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

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

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.

Flow and Congestion Control (Hosts)

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

Advanced Computer Networks

Chapter 3- parte B outline

CS4700/CS5700 Fundamentals of Computer Networks

Principles of congestion control

CS3600 SYSTEMS AND NETWORKS

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

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

Congestion / Flow Control in TCP

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

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

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

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

CNT 6885 Network Review on Transport Layer

8. TCP Congestion Control

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

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

Chapter 3 Review Questions

Wireless TCP Performance Issues

Review Questions for Midterm Exam-2 Fall 2016

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

TCP over Wireless PROF. MICHAEL TSAI 2016/6/3

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

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

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Fall 2012: FCM 708 Bridge Foundation I

Investigating the Use of Synchronized Clocks in TCP Congestion Control

6.3 TCP congestion control 499

Congestion Control. Resource allocation and congestion control problem

Internet Networking recitation #10 TCP New Reno Vs. Reno

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

TCP Congestion Control

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

Exercises TCP/IP Networking With Solutions

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

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

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

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

image 3.8 KB Figure 1.6: Example Web Page

Detecting half-open connections. Observed TCP problems

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

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

CSE 123A Computer Networks

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

Introduc)on to Computer Networks

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

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

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

Advanced Computer Networks

cs/ee 143 Communication Networks

ECE4110, Internetwork Programming, QUIZ 2 - PRACTICE Spring 2006

Transmission Control Protocol (TCP)

Congestion Control. Tom Anderson

TCP based Receiver Assistant Congestion Control

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

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

Transcription:

Congestion Control in TCP Antonio Carzaniga Faculty of Informatics University of Lugano November 11, 2014

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

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 2005 2007 Antonio Carzaniga

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

Queuing Delay Total latency is the sum of link latency, processing time, and the time that a packet spends in the input queue L= TX + CPU + q where q = q /T 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 L= TX + CPU + q where q = q /T 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 2005 2007 Antonio Carzaniga

Queuing Delay Steady-state queuing delay 0 λ in < T q = λ in T T t λ in > T

Queuing Delay Steady-state queuing delay 0 λ in < T q = λ in T T t λ in > T q λ in T ideal input flow λ in constant

Queuing Delay Steady-state queuing delay 0 λ in < T q = λ in T T t λ in > T q q λ in T ideal input flow λ in constant λ in T realistic input flow λ in variable

Queuing Delay 2005 2007 Antonio Carzaniga

Queuing Delay Conclusion: as the input rateλ in approaches the maximum throughput T, packets will experience very long delays

Queuing Delay Conclusion: as the input rateλ in approaches the maximum throughput T, packets will experience very long delays More realistic assumptions and models finite queue length (buffers) in routers effects of retransmission overhead

Queuing Delay Conclusion: as the input rateλ in approaches the maximum throughput T, packets will experience very long delays More realistic assumptions and models finite queue length (buffers) in routers effects of retransmission overhead T λ out λ in

Queuing Delay Conclusion: as the input rateλ in approaches the maximum throughput T, packets will experience very long delays More realistic assumptions and models finite queue length (buffers) in routers effects of retransmission overhead T congestion λ out λ in

What to Do? What to do when the network is congested and queues are full? λ 3 = T/2 λ 1 = T/2 λ 2 = T/2 max throughput T throughput= T

What to Do? What to do when the network is congested and queues are full? λ 1 = T/2 max throughput T throughput= T

What to Do? What to do when the network is congested and queues are full? λ 1 = T/2 max throughput T throughput= T

What to Do? What to do when the network is congested and queues are full? λ 1 = T/2 max throughput T throughput= T

What to Do? What to do when the network is congested and queues are full? λ 1 = T/2 max throughput T throughput= T

Congestion Control (in TCP) 2005 2007 Antonio Carzaniga

Congestion Control (in TCP) Approach: the sender limits its output rate according to the status of the network the sender output rate becomes (part of) the input rate for the network (λ in )

Congestion Control (in TCP) Approach: the sender limits its output rate according to the status of the network the sender output rate becomes (part of) the input rate for the network (λ in ) Issues

Congestion Control (in TCP) Approach: the sender limits its output rate according to the status of the network the sender output rate becomes (part of) the input rate for the network (λ in ) Issues how does the sender measure the status of the network? i.e., how does the sender detect congestion? 2005 2007 Antonio Carzaniga

Congestion Control (in TCP) Approach: the sender limits its output rate according to the status of the network the sender output rate becomes (part of) the input rate for the network (λ in ) Issues how does the sender measure the status of the network? i.e., how does the sender detect congestion? how does the sender effectively limit its output rate? 2005 2007 Antonio Carzaniga

Congestion Control (in TCP) Approach: the sender limits its output rate according to the status of the network the sender output rate becomes (part of) the input rate for the network (λ in ) Issues how does the sender measure the status of the network? i.e., how does the sender detect congestion? how does the sender effectively limit its output rate? how should the sender modulate its output rate? i.e., what algorithm should the sender use to decrease or increase its output rate? 2005 2007 Antonio Carzaniga

Detecting Congestion 2005 2007 Antonio Carzaniga

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 Congestion means that the queue of one or more routers between the sender and the receiver overflow the visible effect is that some segments are dropped

Detecting Congestion If all traffic is correctly acknowledged, then the sender assumes (quite correctly) that there is no congestion Congestion means that the queue of one or more routers between the sender and the receiver overflow the visible effect is that some segments are dropped Therefore the server assumes that the network is congested when it detects a segment loss time out (i.e., no ACK) multiple acknowledgements (i.e., NACK)

Congestion Window The sender maintains a congestion window W

Congestion Window The sender maintains a congestion window W The congestion window limits the amount of bytes that the sender pushes into the network before blocking waiting for acknowledgments

Congestion Window The sender maintains a congestion window W The congestion window 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 W The congestion window 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

Congestion Control How does TCP modulate its output rate?

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

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

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

Additive-Increase/Multiplicative-Decrease 2005 2007 Antonio Carzaniga

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, that is 1 segment, which is quite low for modern networks

Slow Start What is the initial value of W? The initial value of W is MSS, that is 1 segment, which is quite low for modern networks To get quickly to a good throughput level, TCP increases its sending rate exponentially for its first growth phase, up to a slow-start threshold (ssthresh)

Slow Start What is the initial value of W? The initial value of W is MSS, that is 1 segment, which is quite low for modern networks To get quickly to a good throughput level, TCP increases its sending rate exponentially for its first growth phase, up to a slow-start threshold (ssthresh) After the threshold, TCP proceeds with its linear push

Slow Start What is the initial value of W? The initial value of W is MSS, that is 1 segment, which is quite low for modern networks To get quickly to a good throughput level, TCP increases its sending rate exponentially for its first growth phase, up to a slow-start threshold (ssthresh) After the threshold, TCP 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, three duplicate ACKs are interpreted as a NACK

Timeouts vs. NACKs As we know, three duplicate ACKs are interpreted as a NACK Both timeouts and NACKs signal a loss, but they say different things about the status of the network

Timeouts vs. NACKs As we know, three duplicate ACKs are interpreted as a NACK Both timeouts and NACKs signal a loss, but they say different things about the status of the network A timeout indicates congestion

Timeouts vs. NACKs As we know, three duplicate ACKs are interpreted as a NACK Both timeouts and NACKs signal a loss, but they say different things about the status of the network A timeout indicates congestion Three (duplicate) ACKs suggest that the network is still able to deliver segments along that path

Timeouts vs. NACKs As we know, three duplicate ACKs are interpreted as a NACK Both timeouts and NACKs signal a loss, but they say different things about the status of the network A timeout indicates congestion Three (duplicate) ACKs suggest 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

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 set ssthresh= W/2 run slow start up to W = ssthresh then proceed with congestion avoidance Timeouts vs. NACKs

Assuming the current window size is W = W Timeout go back to W= MSS set ssthresh= W/2 run slow start up to W = ssthresh then proceed with congestion avoidance Timeouts vs. NACKs NACK (i.e., triple duplicate-ack) set ssthresh= W/2 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 W MSS Time

Sender Behavior W NACK MSS Time

Sender Behavior W NACK MSS Time

Sender Behavior timeout W NACK MSS Time

Sender Behavior timeout W NACK MSS Time

Sender Behavior timeout W NACK MSS Time

Sender Behavior timeout W NACK MSS Time

Sender Behavior NACK timeout W NACK MSS Time

Sender Behavior NACK W NACK timeout NACK MSS Time

Sender Behavior NACK W NACK timeout NACK MSS Time

Sender Behavior NACK W NACK timeout NACK MSS Time

Sender Behavior SS=slow start CA=congestion avoidance SS CA SS CA CA CA NACK W NACK timeout NACK MSS Time