TCP Congestion Control

Similar documents
TCP Congestion Control

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Internet Networking recitation #10 TCP New Reno Vs. Reno

CS3600 SYSTEMS AND NETWORKS

image 3.8 KB Figure 1.6: Example Web Page

CS4700/CS5700 Fundamentals of Computer Networks

8. TCP Congestion Control

Computer Networking Introduction

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

CS321: Computer Networks Congestion Control in TCP

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

COMP/ELEC 429/556 Introduction to Computer Networks

Quality of Service. Traffic Descriptor Traffic Profiles. Figure 24.1 Traffic descriptors. Figure Three traffic profiles

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

ADVANCED COMPUTER NETWORKS

TCP congestion control:

TCP Congestion Control

ECE 461 Internetworking. Problem Sheet 6

Chapter III: Transport Layer

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

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Lecture 3: The Transport Layer: UDP and TCP

Mid Term Exam Results

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

What Is Congestion? Effects of Congestion. Interaction of Queues. Chapter 12 Congestion in Data Networks. Effect of Congestion Control

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

TCP based Receiver Assistant Congestion Control

Flow and Congestion Control Marcos Vieira

Advanced Computer Networks

TCP Congestion Control in Wired and Wireless Networks

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

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

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

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

UNIT IV -- TRANSPORT LAYER

Advanced Computer Networks

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

CSCI Topics: Internet Programming Fall 2008

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

CSCD 330 Network Programming Winter 2015

Transport Layer Congestion Control

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

CSCI Topics: Internet Programming Fall 2008

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

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

cs/ee 143 Communication Networks

CMPE 257: Wireless and Mobile Networking

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

Transport Protocols and TCP

ECE 333: Introduction to Communication Networks Fall 2001

TCP Congestion Control 65KB W

Congestion Collapse in the 1980s

Chapter 3 Transport Layer

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

Congestion Control in TCP

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

The Transport Layer Congestion control in TCP

Congestion Control in TCP

Performance Analysis of TCP Variants

Congestion Control 3/16/09

Chapter 24. Transport-Layer Protocols

CSC 4900 Computer Networks: TCP

Outline. CS5984 Mobile Computing

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

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

Lecture 15: Transport Layer Congestion Control

Wireless TCP Performance Issues

Transport Layer (Congestion Control)

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

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

Flow and Congestion Control (Hosts)

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

Fall 2012: FCM 708 Bridge Foundation I

IJSRD - International Journal for Scientific Research & Development Vol. 2, Issue 03, 2014 ISSN (online):

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

Transmission Control Protocol (TCP)

Your Name: Your student ID number:

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

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

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

Bandwidth Allocation & TCP

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

TCP OVER AD HOC NETWORK

Chapter 3 Transport Layer

Lecture 4: Congestion Control

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

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

Outline Computer Networking. Functionality Split. Transport Protocols

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

TCP Congestion Control

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

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

Chapter 3 Review Questions

Congestion Control in TCP

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

Problem 7. Problem 8. Problem 9

CSCD 330 Network Programming Spring 2018 Lecture 11a Transport Layer

An analytical model for evaluating utilization of tcp reno

TCP Congestion Control in Wired and Wireless networks

Transcription:

What is Congestion TCP Congestion Control The number of packets transmitted on the network is greater than the capacity of the network Causes router buffers (finite size) to fill up packets start getting dropped Why is it bad? retransmissions cause bandwidth wastage delay is increased Congestion Collapse - retransmissions due to drop due to congestion can further increase congestion!! Effect of Congestion Congestion Control Congestion control aims to keep number of packets below level at which performance falls off dramatically End-to-end flow control is not enough! Independent senders can each have flow control with their receivers, but together can inject large number of packets in the network 1

Mechanisms for Congestion Control Backpressure Congested node slows down or halts flow of packets from some or all incoming nodes These nodes in turn slows down or halts incoming packet flow Propagates back to source Choke Packet Control packet Generated at congested node Sent to source node e.g. ICMP source quench From router or destination Source cuts back until no more source quench message Sent for every discarded packet, or anticipated Rather crude mechanism Implicit Congestion Signaling Transmission delay may increase with congestion Packet may be discarded Source can detect these as implicit indications of congestion and dynamically adjust packet sending rate Useful on connectionless (datagram) networks basis for TCP congestion control 2

TCP Congestion Control Sender estimates level of congestion from packet delay/drop Send more when no congestion detected Slow down when congestion detected Somewhat messy, but simple to implement Two issues: detecting congestion adjusting sending rate Detecting Congestion Detected by detecting packet drops How to detect packet drops? timeout for acknowledgements too many duplicate acknowledgements We will consider only timeout here Adjusting Sending Rate Based on TCP Congestion Window (cwnd) Limits how much data can be in transit (similar to receiver window advertisement, but purpose is different) Max. window size at sender at any time = min (cwnd, recvadvertisedwindow) cwnd is varied to control sending rate to address congestion varied by sender, congestion control is sender-side task recvadvertisedwindow varied to address end-to-end flow control varied by receiver, as discussed earlier Basic principle On detecting packet drop, decrease cwnd On receiving ack, increase cwnd What should be the rates of increase and decrease? different variations exist Two phases of TCP congestion control slow start congestion avoidance 3

Detecting Which Phase to Do Based on a variable ss_thresh (slow start threshold) cwnd initially set to maximum segment size (MSS) slow start : cwnd < ss_thresh congestion avoidance : cwnd > ss_thresh As per RFC, implementations can choose either phase when cwnd = ss_thresh Before we go any further Lets clear up some confusion that may arise in interpreting cwnd cwnd is implemented as number of bytes (as it should be as TCP is byte-oriented) However, most descriptions talks about cwnd in terms of number of segments A segment in the context of cwnd means a full-size segment (size = maximum segment size, MSS), so easy to convert RFC 2581 talks in terms of both We will also talk about cwnd in term of no. of segments (easier to follow from text for students) Slow Start Used to find a good sending rate initially at startup, or while recovering after congestion Whenever starting traffic on a new connection, or whenever increasing traffic after congestion was detected: Intialize cwnd = 1 Each time a segment is acknowledged, increment cwnd by 1 Continue until ss_thresh is reached Packet loss is detected Slow start is cwnd = 1 not so slow!!ack for segment 1 cwnd = 2 cwnd = 4 cwnd = 8 segment 1 segment 2 segment 3 ACK for segments 2 + 3 segment 4 segment 5 segment 6 segment 7 ACK for segments 4+5+6+7 4

Congestion Avoidance Slow Start + Congestion Avoidance Slow start sets a good congestion window fast Congestion avoidance slows down the increase in cwnd If cwnd > ss_thresh then each time a segment is acknowledged increment cwnd by 1/cwnd (cwnd += 1/cwnd) cwnd is increased by one only if all segments have been acknowledged Increases by 1 per RTT, vs. doubling per RTT Additive Increase Assume that ss_thresh = 8 14 12 Cwnd (in segments) 10 8 6 4 2 0 t=0 ssthresh t=2 t=4 Roundtrip times t=6 cwnd = 1 cwnd = 2 cwnd = 4 cwnd = 8 cwnd = 9 cwnd = 10 Congestion Avoidance (contd.) Example On each timeout, ss_thresh is set to half the current size of the congestion window: ss_thresh = cwnd / 2 cwnd is reset to one cwnd = 1 and slow-start is entered This is called multiplicative decrease cwnd Slow Start Timeout ss_thresh Congestion Avoidance ss_thresh Time 5

Other TCP Congestion Control Schemes What we described is TCP Tahoe (see RFC 2581) Other implementations are there for higher throughput TCP Reno : adds fast retransmit and fast recovery with TCP Tahoe (see RFC 2581) used mostly TCP Vegas TCP SACK (selective ACK, see RFC 2018 for basics) Fast Retransmit and Fast Recovery Fast retransmit Retransmit on 3 duplicate ACKs (total 4) for the same segment (without waiting for timeout) Receiver should send ACKs for segments received out of order (creating the duplicate ACKs for the missing segment) Fast recovery Do not enter slow start if fast retransmit is used to send a segment ss-thresh and cwnd set using a slightly complex method Enter slow start on a timeout as usual 6