CS321: Computer Networks Congestion Control in TCP

Similar documents
Computer Networking Introduction

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Chapter III: Transport Layer

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 3 Transport Layer

CSC 4900 Computer Networks: TCP

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

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

The Transport Layer Congestion control in TCP

Chapter 3 Transport Layer

Chapter 3 Transport Layer

image 3.8 KB Figure 1.6: Example Web Page

CSC 8560 Computer Networks: TCP

Mid Term Exam Results

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

Flow and Congestion Control (Hosts)

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

Congestion Collapse in the 1980s

CS3600 SYSTEMS AND NETWORKS

TCP Congestion Control

TCP Congestion Control

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

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

CS4700/CS5700 Fundamentals of Computer Networks

Lecture 15: Transport Layer Congestion Control

Chapter 3- parte B outline

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

Principles of congestion control

Fall 2012: FCM 708 Bridge Foundation I

CNT 6885 Network Review on Transport Layer

Lecture 14: Congestion Control"

Outline. CS5984 Mobile Computing

CSCD 330 Network Programming Winter 2015

Lecture 8. TCP/IP Transport Layer (2)

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

Transport Layer (Congestion Control)

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

Congestion Control 3/16/09

CSE 123A Computer Networks

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

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

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

ADVANCED COMPUTER NETWORKS

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

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

CS321: Computer Networks Error and Flow Control in TCP

TCP Congestion Control

Advanced Computer Networks

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

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

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

Bandwidth Allocation & TCP

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

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

Detecting half-open connections. Observed TCP problems

TCP congestion control:

TCP based Receiver Assistant Congestion Control

UNIT IV -- TRANSPORT LAYER

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

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

Congestions and Control Mechanisms in Wired and Wireless Networks

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

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

Transport Layer Congestion Control

Internet Networking recitation #10 TCP New Reno Vs. Reno

CC451 Computer Networks

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

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

TCP Congestion Control 65KB W

Transport Protocols and TCP: Review

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

TCP: Transmission Control Protocol UDP: User Datagram Protocol TCP - 1

ECE 333: Introduction to Communication Networks Fall 2001

COMP/ELEC 429/556 Introduction to Computer Networks

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

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

Chapter III: Transport Layer

Congestion Control in TCP

ECE 461 Internetworking. Problem Sheet 6

Communication Networks

Transport Protocols and TCP

Congestion Control in TCP

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

ENRICHMENT OF SACK TCP PERFORMANCE BY DELAYING FAST RECOVERY Mr. R. D. Mehta 1, Dr. C. H. Vithalani 2, Dr. N. N. Jani 3

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

CSE 461. TCP and network congestion

15-744: Computer Networking TCP

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Internet Protocols Fall Lecture 16 TCP Flavors, RED, ECN Andreas Terzis

Advanced Computer Networks

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

Congestion Control in TCP

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

Reliable Transport II: TCP and Congestion Control

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

Transmission Control Protocol (TCP)

Congestion control in TCP

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

Transcription:

CS321: Computer Networks Congestion Control in TCP Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in

Causes and Cost of Congestion Scenario-1: Two Senders, a Router with Infinite Buffers Host A and B share a link of capacity R No matter how high Hosts A and B set their sending rates, they will each never see a throughput higher than R/2. When the sending rate exceeds R/2, the average number of queued packets in the router is unbounded, and the average delay between source and destination becomes infinite. 01-03-2018 Dr. Manas Khatua 2

Cont Thus, while operating at an aggregate throughput of near R may be ideal from a throughput standpoint, it is far from ideal from a delay standpoint. Even in this (extremely) idealized scenario one cost of a congested network large queuing delays are experienced as the packet arrival rate nears the link capacity. Scenario-2: Two Senders, a Router with Finite Buffers Case1: Host A is able to somehow determine whether or not a buffer is free in the router and thus sends a packet only when a buffer is free. Case2: the sender retransmits only when a packet is known for certain to be lost. cost of a congested network the sender must perform retransmissions in order to compensate for dropped (lost) packets due to buffer overflow Case3: the sender may time out prematurely and retransmit a packet that has been delayed in the queue but not yet lost. cost of a congested network unneeded retransmissions by the sender in the face of large delays may cause a router to use its link bandwidth to forward unneeded copies of a packet. 01-03-2018 Dr. Manas Khatua 3

Cont 01-03-2018 Dr. Manas Khatua 4

Cont Scenario 3: Four Senders, Routers with Finite Buffers, and Multihop Paths cost of congestion when a packet is dropped along a path, the transmission capacity that was used at each of the upstream links to forward that packet to the point at which it is dropped ends up having been wasted. Scenario 3 performance with finite buffers and multihop paths 01-03-2018 Dr. Manas Khatua 5

Approaches to Congestion Control two broad approaches to congestion control End-to-end congestion control The presence of congestion in the network must be inferred by the end systems based only on observed network behavior (for example, packet loss and delay). Suitable for Datagram based approach TCP follows this approach Network-assisted congestion control Network-layer components (that is, routers) provide explicit feedback to the sender regarding the congestion state in the network. Suitable for virtual-circuit based approach used in ATM available bit-rate (ABR) congestion control ECN based scheme for TCP/IP Direct feedback: sent from a network router to the sender Indirect feedback: router marks/updates a field in a packet flowing from sender to receiver to indicate congestion. Upon receipt of a marked packet, the receiver then notifies the sender of the congestion indication. 01-03-2018 Dr. Manas Khatua 6

TCP Congestion Control The use of flow control in TCP cannot avoid congestion in intermediate routers because a router may receive data from more than one sender Flow control is for individual TCP sender There is no congestion at the either end there may be congestion in the middle. TCP cannot ignore the congestion in network (at the intermediate points) as it wants to provide end-to-end reliability TCP must use end-to-end congestion control rather than networkassisted congestion control Basic approach for Congestion control in TCP: each sender limit the rate at which it sends traffic into its connection as a function of perceived network congestion. 01-03-2018 Dr. Manas Khatua 7

Cont If a TCP sender perceives less congestion on the path between itself and the destination the TCP sender increases its send rate if the TCP sender perceives huge congestion along the path the TCP sender reduces its send rate It should not aggressively send segments to the network It cannot be very conservative, either, sending a small number of segments in each time interval Questions need to answer: How does a TCP sender limit the rate at which it sends traffic into its connection? How does a TCP sender perceive that there is congestion on the path between itself and the destination? What congestion control algorithm should the sender use to change its send rate as a function of perceived end-to-end congestion? 01-03-2018 Dr. Manas Khatua 8

Answers Answer of 1 st Question: To control the number of segments to transmit, TCP uses another variable called Congestion Window (cwnd) Actually, the cwnd variable and the rwnd variable (used for flow control) together define the size of the send window in TCP Actual send window size = minimum (rwnd, cwnd) The constraint above limits the amount of unacknowledged data at the sender and therefore indirectly limits the sender s send rate. Answer of 2 nd Question: TCP sender uses the occurrence of two events as signs of congestion: time-out receiving three duplicate ACKs 01-03-2018 Dr. Manas Khatua 9

Cont Answer of 3 rd Question: There exist many congestion control algorithm for adjusting the value of cwnd based upon end-to-end congestion Modified TCP with congestion control algorithms Taho TCP: both signs of occurrence are treated equally Reno TCP: both signs of occurrence are treated differently New Reno TCP: TCP checks to see if more than one segment is lost in the current window when three duplicate ACKs arrive Further Issues: If TCP senders collectively send too fast, they can congest the network, leading to congestion collapse if TCP senders are too cautious and send too slowly, they could under utilize the bandwidth in the network; there is no explicit signaling of congestion state by the network ACKs and loss events serve as implicit signals and that each TCP sender acts on local information asynchronously from other TCP senders TCP congestion-control algorithm has three major components (1) slow start (2) congestion avoidance (3) fast recovery 01-03-2018 Dr. Manas Khatua 10

Slow Start When a TCP connection begins the value of cwnd is typically initialized to a small value of 1 MSS, resulting in an initial sending rate of roughly MSS/RTT. (MSS: maximum-sized segments; default value is 536 octets) In the slow-start state, the value of cwnd begins at 1 MSS and increases by 1 MSS every time a transmitted segment is first acknowledged. TCP sends the first segment into the network and waits for an ACK. When this ACK arrives, the TCP sender increases the cwnd by 1 MSS and sends out 2 MSS These segments are then ACKed, with the sender increasing the cwnd by 1 MSS for each of the ACKed segments, giving a cwnd of 4 MSS, and so on. This process results in a doubling of the sending rate every RTT. Thus, the TCP send rate starts slow but grows exponentially during the slow start phase. 01-03-2018 Dr. Manas Khatua 11

Cont the size of the cwnd increases exponentially until it reaches a threshold the size of the cwnd is determined as follows: If an ACK arrives, cwnd = cwnd + 1. 01-03-2018 Dr. Manas Khatua 12

Cont But when should this exponential growth end? Answer: First, if there is a loss event (i.e., congestion) indicated by a timeout, the TCP sender sets the value of cwnd to 1 begins the slow start process anew. sets the value of ssthresh (slow start threshold) to cwnd/2. Second, when the value of cwnd equals ssthresh, TCP transitions into congestion avoidance state Third, if three duplicate ACKs are detected, TCP performs a fast retransmit and enters the fast recovery state sets the value of ssthresh to cwnd/2. sets the value of cwnd to ssthresh + 3 MSS. Slow-start strategy is slower in the case of delayed ACK. If two segments are ACKed cumulatively, the size of the cwnd increases by 1, not 2. With one ACK for every two segments, the growth is a power of 1.5, but still exponential 01-03-2018 Dr. Manas Khatua 13

Cont F S M 01-03-2018 Dr. Manas Khatua 14

Congestion Avoidance On entry to the congestion-avoidance state, the value of cwnd is approximately half its value when congestion was last encountered To avoid congestion before it happens, we must slow down the exponential growth of cwnd When the size of the cwnd reaches the ssthresh (slow-start threshold), the slow-start phase stops and the additive phase begins. increase the cwnd additively instead of exponentially. If three duplicate ACKs are detected, TCP performs a fast retransmit and enters the fast recovery state 01-03-2018 Dr. Manas Khatua 15

Cont If a new ACK arrives, cwnd = cwnd + (1/ cwnd) 01-03-2018 Dr. Manas Khatua 16

Fast Recovery this algorithm is also an additive increase, but it starts when three duplicate ACK arrives If a duplicate ACK arrives (after the three duplicate ACK which triggers the recovery) cwnd = cwnd + (1/ cwnd) If timeout occurs, TCP moves back to slow start state If any new ACK arrives, TCP moves back to congestion avoidance state This state is recommended, but not mandatory in TCP 01-03-2018 Dr. Manas Khatua 17

TCP Tahoe In TCP Tahoe both signs of congestion occurrence (time-out, 3 duplicate ACK) are treated equally uses only slow start and congestion avoidance states 01-03-2018 Dr. Manas Khatua 18

TCP Reno Incorporated the Fast Recovery State 01-03-2018 Dr. Manas Khatua 19

TCP New Reno It differs from RENO in that it doesn t exit fast-recovery until all the data which was outstanding at the time it entered fast recovery is acknowledged. TCP New Reno version is most common today If we ignore the slow-start states at the beginning and the loss of segment is inferred by 3 duplicate ACK, the TCP congestion window is cwnd = cwnd + (1/cwnd) when an ACK arrives cwnd = cwnd /2 when congestion is detected It appears like Additive Increase Multiplicative Decrease (AIMD). Therefore, TCP Congestion control scheme is often referred as AIMD scheme. 01-03-2018 Dr. Manas Khatua 20

TCP Vegas variations of the Reno algorithm TCP Vegas algorithm attempts to avoid congestion while maintaining good throughput The basic idea of Vegas is to (1) detect congestion in the routers between source and destination before packet loss occurs, and (2) lower the rate linearly when this imminent packet loss is detected. 01-03-2018 Dr. Manas Khatua 21

TCP Throughput it s natural to consider what the average throughput of a long-lived TCP connection might be? we ll ignore the slow-start phases that occur after timeout events as these phases are typically very short. During a particular round-trip interval, the rate at which TCP sends data is a function of the congestion window (cwnd) and the current RTT Let, cwnd = W when a loss event occurs. Assuming that RTT and W are approximately constant over the duration of the connection, the TCP transmission rate ranges from 0.5 (W /RTT) to (W /RTT). Steady-state TCP throughput is the average throughput of a connection = 0.75*(W/RTT) 01-03-2018 Dr. Manas Khatua 22

01-03-2018 Dr. Manas Khatua 23