The Transport Layer Congestion control in TCP

Similar documents
Computer Networking Introduction

Chapter III: Transport Layer

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

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

Chapter 3 Transport Layer

Chapter 3 Transport Layer

CS321: Computer Networks Congestion Control in TCP

Principles of congestion control

Chapter 3 Transport Layer

Mid Term Exam Results

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

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

Flow and Congestion Control (Hosts)

CSC 4900 Computer Networks: TCP

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CNT 6885 Network Review on Transport Layer

Transport Layer Congestion Control

image 3.8 KB Figure 1.6: Example Web Page

Lecture 8. TCP/IP Transport Layer (2)

Lecture 15: Transport Layer Congestion Control

Detecting half-open connections. Observed TCP problems

CSCD 330 Network Programming Winter 2015

Chapter 3- parte B outline

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

UNIT IV -- TRANSPORT LAYER

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

Congestion Control in TCP

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

TCP congestion control:

Chapter 3 Transport Layer

The Transport Layer: TCP & Congestion Control

CS3600 SYSTEMS AND NETWORKS

CC451 Computer Networks

CS4700/CS5700 Fundamentals of Computer Networks

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

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

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Flow and Congestion Control Marcos Vieira

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

Congestion Control in TCP

TCP Congestion Control

TCP Congestion Control

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

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

Chapter III: Transport Layer

15-744: Computer Networking TCP

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

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

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

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

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

Congestion Control 3/16/09

CSC 8560 Computer Networks: TCP

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

Congestion Control in TCP

Fall 2012: FCM 708 Bridge Foundation I

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

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

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

CSCI Topics: Internet Programming Fall 2008

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

ADVANCED COMPUTER NETWORKS

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

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

Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse

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

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

Bandwidth Allocation & TCP

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

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

CSCD 330 Network Programming Spring 2018 Lecture 11a Transport Layer

Congestion Control in TCP

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

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

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

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

Chapter 3 Transport Layer

TCP Congestion Control

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

Congestion control in TCP

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

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

Congestion Control in TCP

8. TCP Congestion Control

Congestion Control in TCP

TCP Congestion Control

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

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

CSE 473 Introduction to Computer Networks. Midterm Exam Review

Advanced Computer Networks

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

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

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

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

Master Course Computer Networks IN2097

Chapter 3: Transport Layer

Problem 7. Problem 8. Problem 9

CSC 401 Data and Computer Communications Networks

Transcription:

CPSC 360 Network Programming The Transport Layer Congestion control in TCP Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu http://www.cs.clemson.edu/~mweigle/courses/cpsc360 1 Congestion Control Congestion control v. Flow control! In flow control the sender adjusts its transmission rate so as not to overwhelm the receiver» One source is sending too fast for a receiver to handle! In congestion control the sender(s) adjust their transmission rate so as not to overwhelm routers in the network» Many sources independently work to avoid sending too much too fast for the network to handle! Symptoms of congestion:» Lost packets (buffer overflow at routers)» Long delays (queuing in router buffers)

Congestion Control Fairness... k 1 k 1 k k k+1...! When a connection slows down, by how much should it slow down?! If n k connections share a congested link k with capacity k, each connection should receive r = k /n k bandwidth! But what if a connection can t consume /n bandwidth? 3 Congestion Control Fairness... k 1 k 1 k k k+1...! A connection can t consume more bandwidth on link k than it consumes on any previous link! If a connection traverses L links then its end-to-end bandwidth is r! MIN( 1 /n 1,, L /n L )! k /n! Fairness implies that if there exists a connection such that r! k /n, then the connection s unused share of the bandwidth on link k, k /n r, is evenly shared with all other connections that are capable of consuming more bandwidth

Congestion Control MAX-MIN Fairness! Consider a set of n connections that consume r 1! r!! r n bits per second of bandwidth! Fairness implies that» No connection receives more bandwidth than it requires» If a connection receives less bandwidth than it requires then it receives the same amount of bandwidth as all other unsatisfied connection Initially each connection gets /n of a link s capacity. If r 1 < /n then the unused /n r 1 is reallocated. such that flows through n receive /n + /n r 1 n 1 of the link s capacity. 5 Congestion Control MAX-MIN Fairness! Consider a set of n connections that consume r 1! r!! r n bits per second of bandwidth! Fairness implies that» No connection receives more bandwidth than it requires» If a connection receives less bandwidth than it requires then it receives the same amount of bandwidth as all other unsatisfied connection Initially each connection gets /n of a link s capacity. If r 1 < /n and r < /n + (/n r 1 )/(n 1) then the unused bandwidth is reallocated such that flows 3 through n receive /n r /n + 1 /n + (/n r + 1 )/(n 1) r n 1 n of the link s capacity. 6

The Causes and Effects of Congestion Scenario 1: Two equal-rate senders share a single link x CPU B 3 T 3 B B 1!out outer! Two sources send at an average rate of to two receivers across a shared link with capacity» Data is delivered to the application at the receiver at rate! out! Packets queue at the router» Assume the router has infinite storage capacity (Thus no packets are lost and there are no retransmissions) 7 The Causes and Effects of Congestion Scenario 1: Two equal-rate senders share a single link /! out Time / Throughput Delay /! The maximum achievable per connection throughput is constrained by 1 / the capacity of the shared link! Exponentially large delays are experienced when the router becomes congested» The queue grows without bound 8

The Causes and Effects of Congestion Scenario : Finite capacity router queue x! in CPU B 3 T 3 B B 1! in! in outer! out! Assume packets can now be lost» Sender retransmits upon detection of loss! Define offered load as the original transmissions plus retransmissions»! in = +! retransmit 9 The Causes and Effects of Congestion Scenario : Throughput analysis / /3 /! out /! in Ideal throughput ( =! in ) Perfect retransmissions (! out <! in ) (But an extreme loss rate!) Early retransmissions (! in = ) (Each segment transmitted twice) Early retransmissions plus loss Throughput! By definition! out =! etransmission scenarios:» Perfect etransmissions occur only when there is loss» Premature Delayed packets are retransmitted 10

The Causes and Effects of Congestion Scenario 3: Four equal-rate senders share multiple hops! Each source s traffic transits two routers! outers have finite storage! All links have the same capacity! Senders retransmit lost packets A! 3 in D 1 B C! What happens as and! in increase?! in = +! retransmit 11 The Causes and Effects of Congestion Scenario 3: Four equal-rate senders share multiple hops! Throughput increases linearly as the network remains underloaded! At the saturation point loss occurs! Once loss occurs the offered load increases! Loss rates increase D A 3 C If! in >> then A s traffic dominates link 1 1 B Eventually! out = 0! 1

The Causes and Effects of Congestion Scenario 3: Throughput analysis /! out /! in Throughput! Congestion collapse» All the links are fully utilized but no is delivered to applications! 13 The Causes and Effects of Congestion Summary! Uncontrolled, congestion can lead to dropped packets» This means that bandwidth used delivering packets to the point of congestion was wasted D A 3 1 B! In the limit it can lead to network collapse» The network is fully busy but no work gets done C 1

Approaches to Congestion Control End-to-end v. Hop-by-hop ATE r 1 ACK x ACK x ACK x X! End-to-end congestion control» End-systems receive no feedback from network» Congestion inferred by observing loss and/or delay! Hop-by-hop congestion control» outers provide feedback to end systems " Network determines an explicit rate that a sender should transmit at " Network signals congestion by setting a bit in a packet s header (SNA, DECbit, TCP/IP ECN, ATM) 15 End-to-End Congestion Control TCP Congestion Control Byte sequence 1 st Byte Sent and ACKed Sender!s Congestion Window Sent and not ACKed Eligible to be sent Ineligible Last Byte nextseqnum (= LastByteSent + 1) sendbase (= LastByteACKed + 1)! Transmission rate is limited by the congestion window size, congwin, or cwnd LastByteSent - LastByteACKed! MIN(congWin,cvWindow)! Maximum rate is w MSS byte segments sent every TT w x MSS throughput = TT bytes/sec 16

TCP Congestion Control Congestion window and transmission rate! If w " MSS/ < TT, then the maximum rate at which a TCP connection can transmit is w x MSS TT bytes/sec wmss bytes TT secs Host A ACK Host B! w is the minimum of the number of segments in the receiver s window or the congestion window ACK Time 17 TCP Congestion Control Congestion window control Byte sequence 1 st Byte Sender!s Congestion Window Last Byte! TCP connections probe for available bandwidth» Increase the congestion window until loss occurs» When loss is detected decrease window, then begin probing (increasing) again! The congestion window grows in two phases:» Slow start amp up transmission rate until loss occurs» Congestion avoidance Keep connection close to sustainable bandwidth! A window size threshold (bytes transmitted) distinguishes between slow start and congestion avoidance phases 18

TCP Congestion Control Slowstart congwin = 1 MSS for (each original ACK received) congwin++ until (loss event O congwin > threshold)! Exponential increase in window size each TT until:» Loss occurs» congwin = threshold (Not so slow!) TT Host A Host B one segment two segments four segments Time 19 TCP Congestion Control Congestion avoidance /* slowstart is over; congwin > threshold */ until (loss event) { whenever congwin segments ACKed: congwin++ } /* loss event timeout */ threshold = congwin/ congwin = 1 MSS perform slowstart Congestion window size (segments) 1 11 10 9 8 Threshold 7 6 5 Threshold Loss 3 event 1 0 0 1 3 5 6 7 8 9 10 111 131 Window transmissions 0

TCP Congestion Control Slow-start v. Congestion avoidance Initial Threshold is 1 MB " 700 segments! The threshold is an estimate of a safe level of throughput that is sustainable in the network» The threshold specifies a throughput that was sustainable in the recent past! Slow-start quickly increases throughput to this threshold! Congestion avoidance slows probes for additional available bandwidth beyond the threshold Congestion window size (segments) 0 18 16 1 1 10 8 6 Slow Start Congestion Avoidance 0 0 6 8 10 1 1 16 18 0 Window transmissions Assume TT > w x MSS TCP Congestion Control Slow-start v. Congestion avoidance Initial Threshold is 1 MB " 700 segments! Loss (at any time) reduces the safe throughput estimate to 1/ of the current throughput» This is the throughput that resulted in loss! Slow-start begins anew whenever there is loss! Throughput at initial threshold = 1 MB/TT» At 1 st threshold: 16MSS/TT» At nd threshold: 10MSS/TT Congestion window size (segments) 0 18 16 1 1 10 8 6 Slow Start Congestion Avoidance 0 0 6 8 10 1 1 16 18 0 Window transmissions Assume TT > w x MSS 3

TCP Congestion Control Major TCP variants! TCP Tahoe:» Loss signaled by timeout» threshold = congwin/» congwin = 1 MSS» Fast retransmit " receipt of 3 duplicate ACKs also signals a packet loss! TCP eno:» Fast recovery " skips slowstart and continues in congestion avoidance " congwin = congwin/ " additive increase, multiplicative decrease (AIMD) Congestion window size (segments) 0 18 16 1 1 10! Others: TCP Neweno, SACK, 8 6 Slow Start Congestion Avoidance 3 duplicate ACKs 0 0 6 8 10 1 1 16 18 0 Window transmissions Assume TT > w x MSS