TCP Congestion Control 65KB W

Similar documents
Internet Networking recitation #10 TCP New Reno Vs. Reno

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

TCP congestion control:

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

image 3.8 KB Figure 1.6: Example Web Page

Congestion Control in TCP

CS321: Computer Networks Congestion Control in TCP

Computer Networking Introduction

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

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

Reliable Transport II: TCP and Congestion Control

TCP Congestion Control

TCP Congestion Control

The Transport Layer: TCP & Congestion Control

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

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

Bandwidth Allocation & TCP

Mid Term Exam Results

Congestion Control in TCP

Flow and Congestion Control Marcos Vieira

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

8. TCP Congestion Control

This sequence diagram was generated with EventStudio System Designer (

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

CSE 461. TCP and network congestion

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

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

Performance Analysis of TCP Variants

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

Reliable Transport II: TCP and Congestion Control

Networked Systems and Services, Fall 2017 Reliability with TCP

Networked Systems and Services, Fall 2018 Chapter 3

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

Fall 2012: FCM 708 Bridge Foundation I

Transport Protocols and TCP: Review

TCP Congestion Control

cs/ee 143 Communication Networks

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

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 3/16/09

Congestion Control in TCP

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

TCP Congestion Control

Transport Protocols & TCP TCP

CS3600 SYSTEMS AND NETWORKS

Lecture 3: The Transport Layer: UDP and TCP

Transport Layer (Congestion Control)

Outline. CS5984 Mobile Computing

Chapter 3 Transport Layer

CSE 123A Computer Networks

Advanced Computer Networks

Congestion Collapse in the 1980s

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

TCP Performance. EE 122: Intro to Communication Networks. Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

CS4700/CS5700 Fundamentals of Computer Networks

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

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

Chapter III: Transport Layer

CSCI Topics: Internet Programming Fall 2008

An Issue in NewReno After Fast Recovery. Yoshifumi Nishida

Lecture 4: Congestion Control

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

TCP Enhancements in Linux. Pasi Sarolahti. Berkeley Summer School Outline

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

CNT 6885 Network Review on Transport Layer

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

Chapter 3- parte B outline

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

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

CSCI Topics: Internet Programming Fall 2008

Chapter 3 Transport Layer

ECE 435 Network Engineering Lecture 10

Congestion Avoidance and Control. Rohan Tabish and Zane Ma

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

TCP over wireless links

Communication Networks

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

COMP/ELEC 429/556 Introduction to Computer Networks

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

Transport Protocols and TCP

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

Congestion control in TCP

UNIT IV -- TRANSPORT LAYER

CSCI Topics: Internet Programming Fall 2008

ADVANCED COMPUTER NETWORKS

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

Midterm Review. EECS 489 Computer Networks Z. Morley Mao Monday Feb 19, 2007

SharkFest'17 US. Understanding Throughput & TCP Windows. A Walk-Through of the Factors that can limit TCP Throughput Performance

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

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

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

TCP Congestion Control

Transport Protocols. Raj Jain. Washington University in St. Louis

Transmission Control Protocol (TCP)

TCP over Wireless. Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land 1

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

Lecture 15: Transport Layer Congestion Control

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

Transcription:

TCP Congestion Control 65KB W TO 3DA 3DA TO 0.5 0.5 0.5 0.5 3 3 1 SS SS CA SS CA

TCP s Congestion Window Maintenance TCP maintains a congestion window (cwnd), based on packets Sender s window is limited to MIN(receiver s window, cwnd) Maintenance policy: On congestion signal, multiplicative decrease On success, additive increase Additive increase/multiplicative decrease produces stability 2

Window Increase/Decrease TCP Congestion Avoidance: Use packet loss as indicator of congestion On loss, divide cwnd by 2 On successful ACK, increase cwnd by 1/cwnd Results in window growth of 1 packet for each window s worth of ACKs [near linear] 3

TCP Congestion Avoidance cwnd Loss Events ~Linear Growth Time 4

TCP Congestion Avoidance Increase by 1 packet per window Increase by 1 packet per window Time Sender Receiver 5

Congestion Avoidance TCP Congestion Avoidance makes sense when the connection is operating near capacity (in steadystate, but searching for any capacity change) What about when a connection starts up, or there has been a long pause? Need a way to get to equilibrium 6

TCP Slow Start Slow-start is a TCP behavior used to get to packet equilibrium Slow-start increases the congestion window exponentially, rather than linearly Why called slow-start then? It is considerably slower than the start based only on the receiver s advertised window 7

TCP Slow Start For each ACK received, increase the congestion window by 1 Results in cwnd pattern of: 1, 2, 4, 8, 16, 32, Takes time proportional to log 2 W to reach window of W, [longer if ACKs delayed] 8

TCP Slow Start cwnd Number of RTTs 9

TCP Slow Start Increase by 1 packet per ACK Time Sender Receiver 10

TCP Congestion Behaviors Two algorithms: Slow-start: getting to equilibrium Congestion avoidance: searching for new available bandwidth in path (and reacting to congestion) The two behaviors are mutually exclusive for any single point in time, but each TCP implements both: Establish an operating point to switch between the two algorithms (ssthresh) 11

Slow-Start Threshold (ssthresh) Need a way to determine whether the TCP should do slow-start or congestion avoidance New variable (ssthresh): if cwnd ssthresh, do slow-start if cwnd > ssthresh, do congestion avoidance ssthresh is initialized to a large value, after a congestion signal, cwnd is divided in half, and ssthresh is set to cwnd (can lead to overshoot at start of connection) 12

TCP Slow-Start and Congestion Avoidance cwnd ssthresh CA Region SS Region Number of RTTs 13

ssthresh and cwnd maintenance Congestion window is normally updated on congestion indications (packet drops), and grows linearly if above ssthresh ssthresh is reset to cwnd after it is reduced to keep a marker of the last operating point When does the TCP ever enter slow-start after a connection has started? (hint: if we are doing very badly) 14

Detecting Loss with TCP TCP uses lost packets as indicators of congestion Two methods Timer expiring Fast retransmit Fast retransmit: Because of cumulative ACK, out-of-order data received at receiver may generate duplicate ACKs ( dupacks ) 15

Duplicate ACKs To arrange out-of-order segments, TCP responds immediately with one ACK per packet: Receiver gets: 5, 6, 7, 8, 10, 11, 12, 13 ACKs: 6, 7, 8, 9, 9, 9, 9, 9 [4 dupacks] Actual Sequence_Num and Ack_Num are discrete due to the byte stream Provides a hint to sender that packet 9 is probably missing at receiver and that 4 packets have arrived after 8 arrived [think about retransmit!] 16

Fast Retransmit Heuristic at sender to trigger retransmissions without timeouts To avoid timeout due to delayed packet, look for 3 dupacks So, on 3 rd dupack for packet n, retransmit n, and send more if send window allows If only one packet lost, fills receiver s hole, resulting in cumulative ACK for top of window 17

Fast Retransmit Example tx 2 6 ACK 3 tx 7 ACK 3 Retx 3 3 is lost ACK 8 tx 8 Time Sender Receiver 18

TCP Ack and Fast Retransmissions Transmit Site at Launch Time Receive Site Some Seconds Later 19

Fast RTX Observations Fast retransmit can repair modest packet loss without requiring a retransmission timer to expire Because it requires 3 dupacks to fire, doesn t work so well with small windows (because there won t be enough ACKs generated at the receiver) With large numbers of dropped packets, similar problem (not enough ACKs) 20

Congestion Action on Loss TCP has different behaviors, depending on the way it detects loss (RFC2581) RTX timer expires: ssthresh = MAX(MIN(win,cwnd)/2, 2) cwnd = 1 [or other IW] (initiates slow-start) Fast retransmit (fast recovery): ssthresh = MAX(MIN(win,cwnd)/2, 2) cwnd = ssthresh + 3 each additional dupack increments cwnd by 1 fast recovery cwnd = ssthresh on new ACK 21

Refinements: Summary Actual window = min{raw - OUT, W} where Out = Last sent - Last ACKed 65KB W TO 3DA 3DA TO 0.5 0.5 0.5 0.5 3 3 1 SS SS CA SS CA 22

Summary: TCP Congestion Behavior Slow-start: When: new connection, after idle time, after RTX timer expires How: set cwnd=1, grow window exponentially Why: searches quickly for operating point Congestion avoidance: When: normal operations, fast RTX/recovery How: divide operating point in 1/2 after loss Why: searches slowly for new bandwidth 23