TCP Congestion Control

Similar documents
ADVANCED COMPUTER NETWORKS

Congestion Control 3/16/09

Congestion Control in TCP

Flow and Congestion Control Marcos Vieira

Flow and Congestion Control (Hosts)

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

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

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

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

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

CSE/EE 461. TCP congestion control. Last Lecture. This Lecture. Focus How should senders pace themselves to avoid stressing the network?

CS4700/CS5700 Fundamentals of Computer Networks

CS3600 SYSTEMS AND NETWORKS

TCP congestion control:

Congestion Control in TCP

Computer Networking Introduction

6.3 TCP congestion control 499

TCP. Sliding Windows, Flow Control, and Congestion Control. Networks : TCP Sliding Windows 1

Flow Control, and Congestion Control

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

Mid Term Exam Results

TCP Congestion Control

TCP Congestion Control

CS321: Computer Networks Congestion Control in TCP

11/24/2009. Fundamentals of Computer Networks ECE 478/578. Flow Control in TCP

CSE 461. TCP and network congestion

Transport Protocols and TCP

8. TCP Congestion Control

Chapter III: Transport Layer

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

A Survey on Quality of Service and Congestion Control

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

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

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

Chapter 3- parte B outline

image 3.8 KB Figure 1.6: Example Web Page

Review Questions for Midterm Exam-2 Fall 2016

Congestion Control in TCP

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

Congestion Control. Resource allocation and congestion control problem

Chapter 3 Transport Layer

Flow Control, and Congestion Control

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

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

Transport Protocols CS 640 1

Introduc)on to Computer Networks

ECE 333: Introduction to Communication Networks Fall 2001

Congestion Control & Resource Allocation. Issues in Resource Allocation Queuing Discipline TCP Congestion Control

Lecture 15: Transport Layer Congestion Control

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

Lecture 8. TCP/IP Transport Layer (2)

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

Fall 2012: FCM 708 Bridge Foundation I

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

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

Recap. More TCP. Congestion avoidance. TCP timers. TCP lifeline. Application Presentation Session Transport Network Data Link Physical

UNIT IV. UDP TCP Adaptive Flow Control-Adaptive Retransmission Congestion Control Congestion avoidance QoS.

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

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance

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

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

Chapter 3 Transport Layer

CSC 8560 Computer Networks: TCP

Bandwidth Allocation & TCP

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

EE 122: Transport Protocols. Kevin Lai October 16, 2002

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

Lecture 4: Congestion Control

CSC 4900 Computer Networks: TCP

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

The Transport Layer: TCP & Congestion Control

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

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

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

Intro to LAN/WAN. Transport Layer

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

CSCI Topics: Internet Programming Fall 2008

cs/ee 143 Communication Networks

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

Internet Networking recitation #10 TCP New Reno Vs. Reno

ECE 461 Internetworking. Problem Sheet 6

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

TCP Congestion Control 65KB W

Solutions for Homework #4

Chapter 3 Review Questions

Chapter 3 Transport Layer

CSCD 330 Network Programming Winter 2015

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

Scenario Based Performance Analysis of Variants of TCP using NS2-Simulator

Key question: how to set CongestionWindow which, in turn, affects ARQ s sending rate? linear increase/exponential decrease AIMD

CMPE 257: Wireless and Mobile Networking

Lecture 14: Congestion Control"

The Transport Layer Congestion control in TCP

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

End-to-End Protocols: UDP and TCP. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

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

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

Congestion Control in TCP

Q23-5 In a network, the size of the receive window is 1 packet. Which of the follow-ing protocols is being used by the network?

Transcription:

TCP Congestion Control Lecture material taken from Computer Networks A Systems Approach, Third Ed.,Peterson and Davie, Morgan Kaufmann, 2003. Computer Networks: TCP Congestion Control 1

TCP Congestion Control Essential strategy :: The TCP host sends packets into the network without a reservation and then the host reacts to observable events. Originally TCP assumed FIFO queuing. Basic idea :: each source determines how much capacity is available to a given flow in the network. ACKs are used to pace the transmission of packets such that TCP is self-clocking. Computer Networks: TCP Congestion Control 2

AIMD (Additive Increase / Multiplicative Decrease) CongestionWindow (cwnd) is a variable held by the TCP source for each connection. MaxWindow :: min (CongestionWindow, AdvertisedWindow) EffectiveWindow = MaxWindow (LastByteSent -LastByteAcked) cwnd is set based on the perceived level of congestion. The Host receives implicit (packet drop) or explicit (packet mark) indications of internal congestion. Computer Networks: TCP Congestion Control 3

Additive Increase Additive Increase is a reaction to perceived available capacity. Linear Increase basic idea:: For each cwnd s worth of packets sent, increase cwnd by 1 packet. In practice, cwnd is incremented fractionally for each arriving ACK. increment = MSS x (MSS /cwnd) cwnd = cwnd + increment Computer Networks: TCP Congestion Control 4

Source Destination Add one packet each RTT Figure 6.8 Additive Increase Computer Networks: TCP Congestion Control 5

Multiplicative Decrease * The key assumption is that a dropped packet and the resultant timeout are due to congestion at a router or a switch. Multiplicate Decrease:: TCP reacts to a timeout by halving cwnd. Although cwnd is defined in bytes, the literature often discusses congestion control in terms of packets (or more formally in MSS == Maximum Segment Size). cwnd is not allowed below the size of a single packet. Computer Networks: TCP Congestion Control 6

AIMD (Additive Increase / Multiplicative Decrease) It has been shown that AIMD is a necessary condition for TCP congestion control to be stable. Because the simple CC mechanism involves timeouts that cause retransmissions, it is important that hosts have an accurate timeout mechanism. Timeouts set as a function of average RTT and standard deviation of RTT. However, TCP hosts only sample round-trip time once per RTT using coarse-grained clock. Computer Networks: TCP Congestion Control 7

70 60 50 40 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) 10.0 Figure 6.9 Typical TCP Sawtooth Pattern Computer Networks: TCP Congestion Control 8

Slow Start Linear additive increase takes too long to ramp up a new TCP connection from cold start. Beginning with TCP Tahoe, the slow start mechanism was added to provide an initial exponential increase in the size of cwnd. Remember mechanism by: slow start prevents a slow start. Moreover, slow start is slower than sending a full advertised window s worth of packets all at once. Computer Networks: TCP Congestion Control 9

Slow Start The source starts with cwnd = 1. Every time an ACK arrives, cwnd is incremented. cwnd is effectively doubled per RTT epoch. Two slow start situations: At the very beginning of a connection {cold start}. When the connection goes dead waiting for a timeout to occur (i.e, the advertized window goes to zero!) Computer Networks: TCP Congestion Control 10

Source Destination Slow Start Add one packet per ACK Figure 6.10 Slow Start Computer Networks: TCP Congestion Control 11

Slow Start However, in the second case the source has more information. The current value of cwnd can be saved as a congestion threshold. This is also known as the slow start threshold ssthresh. Computer Networks: TCP Congestion Control 12

70 60 50 40 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) Figure 6.11 Behavior of TCP Congestion Control Computer Networks: TCP Congestion Control 13

Fast Retransmit Coarse timeouts remained a problem, and Fast retransmit was added with TCP Tahoe. Since the receiver responds every time a packet arrives, this implies the sender will see duplicate ACKs. Basic Idea:: use duplicate ACKs to signal lost packet. Fast Retransmit Upon receipt of three duplicate ACKs, the TCP Sender retransmits the lost packet. Computer Networks: TCP Congestion Control 14

Fast Retransmit Generally, fast retransmit eliminates about half the coarse-grain timeouts. This yields roughly a 20% improvement in throughput. Note fast retransmit does not eliminate all the timeouts due to small window sizes at the source. Computer Networks: TCP Congestion Control 15

Sender Receiver Packet 1 Packet 2 Packet 3 Packet 4 ACK 1 ACK 2 Packet 5 Packet 6 Retransmit packet 3 ACK 2 ACK 2 ACK 2 ACK 6 Fast Retransmit Based on three duplicate ACKs Figure 6.12 Fast Retransmit Computer Networks: TCP Congestion Control 16

Figure 6.13 TCP Fast Retransmit Trace 70 60 50 40 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 Time (seconds) Computer Networks: TCP Congestion Control 17

TCP Congestion Control 20 Congestion avoidance Congestion occurs 15 Congestion window 10 5 Slow start Threshold 0 Copyright 2000 The McGraw Hill Companies Round-trip times Leon-Garcia & Widjaja: Communication Networks Figure 7.63 Computer Networks: TCP Congestion Control 18

Fast Recovery Fast recovery was added with TCP Reno. Basic idea:: When fast retransmit detects three duplicate ACKs, start the recovery process from congestion avoidance region and use ACKs in the pipe to pace the sending of packets. Fast Recovery After Fast Retransmit, half cwnd and commence recovery from this point using linear additive increase primed by left over ACKs in pipe. Computer Networks: TCP Congestion Control 19

Modified Slow Start With fast recovery, slow start only occurs: At cold start After a coarse-grain timeout This is the difference between TCP Tahoe and TCP Reno!! Computer Networks: TCP Congestion Control 20

TCP Congestion Control 20 15 Congestion window 10 5 Congestion avoidance Slow start Threshold Congestion occurs Fast recovery would cause a change here. 0 Copyright 2000 The McGraw Hill Companies Round-trip times Leon-Garcia & Widjaja: Communication Networks Figure 7.63 Computer Networks: TCP Congestion Control 21

Adaptive Retransmissions RTT:: Round Trip Time between a pair of hosts on the Internet. How to set the TimeOut value? The timeout value is set as a function of the expected RTT. Consequences of a bad choice? Computer Networks: TCP Congestion Control 22

Original Algorithm Keep a running average of RTT and compute TimeOut as a function of this RTT. Send packet and keep timestamp t s. When ACK arrives, record timestamp t a. SampleRTT = t a -t s Computer Networks: TCP Congestion Control 23

Original Algorithm Compute a weighted average: EstimatedRTT = α x EstimatedRTT + (1- α) ) x SampleRTT Original TCP spec: α in range (0.8,0.9) TimeOut = 2 x EstimatedRTT Computer Networks: TCP Congestion Control 24

Karn/Partidge Algorithm An obvious flaw in the original algorithm: Whenever there is a retransmission it is impossible to know whether to associate the ACK with the original packet or the retransmitted packet. Computer Networks: TCP Congestion Control 25

Figure 5.10 Associating the ACK? Sender Receiver Sender Receiver Original transmission Original transmission Retransmission ACK Retransmission ACK (a) (b) Computer Networks: TCP Congestion Control 26

Karn/Partidge Algorithm 1. Do not measure SampleRTT when sending packet more than once. 2. For each retransmission, set TimeOut to double the last TimeOut. { Note this is a form of exponential backoff based on the believe that the lost packet is due to congestion.} Computer Networks: TCP Congestion Control 27

Jaconson/Karels Algorithm The problem with the original algorithm is that it did not take into account the variance of SampleRTT. Difference = SampleRTT EstimatedRTT EstimatedRTT = EstimatedRTT + (δ x Difference) Deviation = δ ( Difference - Deviation) where δ is a fraction between 0 and 1. Computer Networks: TCP Congestion Control 28

Jaconson/Karels Algorithm TCP computes timeout using both the mean and variance of RTT TimeOut = µ x EstimatedRTT + Φ x Deviation where based on experience µ = 1 and Φ = 4. 4 Computer Networks: TCP Congestion Control 29