If both sources send full windows, we may get congestion collapse

Slides:



Advertisements
Similar presentations
Slide Set 14: TCP Congestion Control. In this set... We begin Chapter 6 but with 6.3. We will cover Sections 6.3 and 6.4. Mainly deals with congestion.
Advertisements

Simulation-based Comparison of Tahoe, Reno, and SACK TCP Kevin Fall & Sally Floyd Presented: Heather Heiman September 10, 2002.
Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
TCP Congestion Control
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Under Reliable Network Service  Design Issues  Under Unreliable.
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth Edition,Peterson.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Introduction to Congestion Control
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
1 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
15-744: Computer Networking L-10 Congestion Control.
1 Lecture 9: TCP and Congestion Control Slides adapted from: Congestion slides for Computer Networks: A Systems Approach (Peterson and Davis) Chapter 3.
Spring 2002CS 4611 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
Spring 2003CS 4611 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
Computer Networks : TCP Congestion Control1 TCP Congestion Control.
Chapter 6 Congestion Control and Resource Allocation
Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control Presented by Bob Kinicki.
Advanced Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth.
TCP Congestion Control
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Reliable Network Service: Design Issues  Unreliable Network.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
Lecture 9 – More TCP & Congestion Control
What is TCP? Connection-oriented reliable transfer Stream paradigm
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
TCP Congestion Control Computer Networks TCP Congestion Control 1.
Spring 2009CSE Congestion Control Outline Resource Allocation Queuing TCP Congestion Control.
TCP Congestion Control
CS 6401 Congestion Control in TCP Outline Overview of RENO TCP Reacting to Congestion SS/AIMD example.
Spring Computer Networks1 Congestion Control II Outline Queuing Discipline Reacting to Congestion Avoiding Congestion DECbit Random Early Detection.
Chapter 5 TCP Sequence Numbers & TCP Transmission Control
9.6 TCP Congestion Control
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
Transport Control Protocol
COMP 431 Internet Services & Protocols
Congestion Control.
Introduction to Congestion Control
Congestion Control Outline Queuing Discipline Reacting to Congestion
Congestion Control Outline Queuing Discipline Reacting to Congestion
Congestion Control Outline Queuing Discipline Reacting to Congestion
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
TCP.
Lecture 19 – TCP Performance
CSS432 Congestion Control Textbook Ch6.1 – 6.4
So far, On the networking side, we looked at mechanisms to links hosts using direct linked networks and then forming a network of these networks. We introduced.
The University of Adelaide, School of Computer Science
Congestion Control in TCP
Transport Control Protocol
Fast Retransmit Sender Receiver
CSS432 Congestion Control Textbook Ch6.1 – 6.4
Chapter 6 TCP Congestion Control
CS640: Introduction to Computer Networks
State Transition Diagram
TCP Congestion Control
CS4470 Computer Networking Protocols
Advanced Computer Networks
TCP Overview.
EE 122: Lecture 10 (Congestion Control)
Congestion Control in TCP
Advanced Computer Networks
Transport Layer: Congestion Control
Computer Networking TCP.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

If both sources send full windows, we may get congestion collapse 10 Mbps 100 Mbps 1.5 Mbps If both sources send full windows, we may get congestion collapse Other forms of congestion collapse: Retransmissions of large packets after loss of a single fragment Non-feedback controlled sources 23-Feb-19 4/598N: Computer Networks

Congestion Response delay throughput load load Avoidance keeps the system performing at the knee Control kicks in once the system has reached a congested state 23-Feb-19 4/598N: Computer Networks

Separation of Functionality Sending host must adjust amount of data it puts in the network based on detected congestion Routers can help by: Sending accurate congestion signals Isolating well-behaved from ill-behaved sources 23-Feb-19 4/598N: Computer Networks

6.3 TCP Congestion Control Idea assumes best-effort network (FIFO or FQ routers)each source determines network capacity for itself uses implicit feedback ACKs pace transmission (self-clocking) Challenge determining the available capacity in the first place adjusting to changes in the available capacity 23-Feb-19 4/598N: Computer Networks

TCP Congestion Control A collection of interrelated mechanisms: Slow start Congestion avoidance Accurate retransmission timeout estimation Fast retransmit Fast recovery 23-Feb-19 4/598N: Computer Networks

Underlying design principle: packet conservation Congestion Control Underlying design principle: packet conservation At equilibrium, inject packet into network only when one is removed Basis for stability of physical systems A mechanism which: Uses network resources efficiently Preserves fair network resource allocation Prevents or avoids collapse Congestion collapse is not just a theory Has been frequently observed in many networks 23-Feb-19 4/598N: Computer Networks

TCP Congestion Control Basics Keep a congestion window, cwnd Denotes how much network is able to absorb Sender’s maximum window: Min (advertised window, cwnd) Sender’s actual window: Max window - unacknowledged segments 23-Feb-19 4/598N: Computer Networks

Congestion Under Infinite Buffering Nagle (RFC 970) showed that congestion will not go away even with infinite buffers Basic argument A datagram network must have TTL With infinite buffering queuing delays increase Even if buffers are not dropped for lack of buffering, they will be dropped because TTL expires 23-Feb-19 4/598N: Computer Networks

Additive Increase/Multiplicative Decrease Objective: adjust to changes in the available capacity New state variable per connection: CongestionWindow limits how much data source has in transit MaxWin = MIN(CongestionWindow, AdvertisedWindow) EffWin = MaxWin - (LastByteSent - LastByteAcked) Idea: increase CongestionWindow when congestion goes down decrease CongestionWindow when congestion goes up 23-Feb-19 4/598N: Computer Networks

Answer: a timeout occurs AIMD (cont) Question: how does the source determine whether or not the network is congested? Answer: a timeout occurs timeout signals that a packet was lost packets are seldom lost due to transmission error lost packet implies congestion 23-Feb-19 4/598N: Computer Networks

AIMD (cont) Algorithm increment CongestionWindow by one packet per RTT (linear increase) divide CongestionWindow by two whenever a timeout occurs (multiplicative decrease) Source Destination … In practice: increment a little for each ACK Increment = (MSS * MSS)/CongestionWindow CongestionWindow += Increment 23-Feb-19 4/598N: Computer Networks

Trace: sawtooth behavior AIMD (cont) Trace: sawtooth behavior 70 60 50 40 KB 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 T ime (seconds) 23-Feb-19 4/598N: Computer Networks

If we have large actual window, should we send data in one shot? Self-clocking If we have large actual window, should we send data in one shot? No, use acks to clock sending new data 23-Feb-19 4/598N: Computer Networks

..Self-clocking Pr Pb receiver sender Ab As Ar 23-Feb-19 4/598N: Computer Networks

Objective: determine the available capacity in the first Idea: Slow Start Objective: determine the available capacity in the first Idea: begin with CongestionWindow = 1 packet double CongestionWindow each RTT (increment by 1 packet for each ACK) Source Destination … 23-Feb-19 4/598N: Computer Networks

Slow Start Example one RTT 0R 1 1R 2 3 2R 4 6 5 7 3R 8 10 12 14 9 11 one pkt time 1R 1 2 3 2R 2 3 4 6 5 7 3R 4 5 6 7 8 10 12 14 9 11 13 15 23-Feb-19 4/598N: Computer Networks

Exponential growth, but slower than all at once Used… Slow Start (cont) Exponential growth, but slower than all at once Used… when first starting connection when connection goes dead waiting for timeout Trace Problem: lose up to half a CongestionWindow’s worth of data 70 60 50 KB 40 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 23-Feb-19 4/598N: Computer Networks

Coarse grained timeout as loss indicator If loss occurs when cwnd = W Congestion Avoidance Coarse grained timeout as loss indicator If loss occurs when cwnd = W Network can absorb 0.5W ~ W segments Set cwnd to 0.5W (multiplicative decrease) Needed to avoid exponential queue buildup Upon receiving ACK Increase cwnd by 1/cwnd (additive increase) Multiplicative increase -> non-convergence 23-Feb-19 4/598N: Computer Networks

Slow Start and Congestion Avoidance If packet is lost we lose our self clocking as well Need to implement slow-start and congestion avoidance together When timeout occurs set ssthresh to 0.5w If cwnd < ssthresh, use slow start Else use congestion avoidance 23-Feb-19 4/598N: Computer Networks

Timeouts can cause sender to Impact of Timeouts Timeouts can cause sender to Slow start Retransmit a possibly large portion of the window Bad for lossy high bandwidth-delay paths Can leverage duplicate acks to: Retransmit fewer segments (fast retransmit) Advance cwnd more aggressively (fast recovery) 23-Feb-19 4/598N: Computer Networks

Fast Retransmit and Fast Recovery Problem: coarse-grain TCP timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission Sender Receiver Packet 1 Packet 2 ACK 1 Packet 3 Packet 4 ACK 2 Packet 5 ACK 2 Packet 6 ACK 2 ACK 2 Retransmit packet 3 ACK 6 23-Feb-19 4/598N: Computer Networks

Fast Retransmit and Recovery If we get 3 duplicate acks for segment N Retransmit segment N Set ssthresh to 0.5*cwnd Set cwnd to ssthresh + 3 For every subsequent duplicate ack Increase cwnd by 1 segment When new ack received Reset cwnd to ssthresh (resume congestion avoidance) 23-Feb-19 4/598N: Computer Networks

Fast Recovery In congestion avoidance mode, if duplicate acks are received, reduce cwnd to half If n successive duplicate acks are received, we know that receiver got n segments after lost segment: Advance cwnd by that number 23-Feb-19 4/598N: Computer Networks

Results Fast recovery skip the slow start phase 70 60 50 40 KB 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 Fast recovery skip the slow start phase go directly to half the last successful CongestionWindow (ssthresh) 23-Feb-19 4/598N: Computer Networks

Implemented using TCP options TCP Extensions Implemented using TCP options Timestamp Protection from sequence number wraparound Large windows 23-Feb-19 4/598N: Computer Networks

Used to improve timeout mechanism by more accurate measurement of RTT Timestamp Extension Used to improve timeout mechanism by more accurate measurement of RTT When sending a packet, insert current timestamp into option Receiver echoes timestamp in ACK 23-Feb-19 4/598N: Computer Networks

Protection Against Wrap Around 32-bit SequenceNum Bandwidth Time Until Wrap Around T1 (1.5 Mbps) 6.4 hours Ethernet (10 Mbps) 57 minutes T3 (45 Mbps) 13 minutes FDDI (100 Mbps) 6 minutes STS-3 (155 Mbps) 4 minutes STS-12 (622 Mbps) 55 seconds STS-24 (1.2 Gbps) 28 seconds Use timestamp to distinguish sequence number wraparound 23-Feb-19 4/598N: Computer Networks

Keeping the Pipe Full 16-bit AdvertisedWindow Bandwidth Delay x Bandwidth Product T1 (1.5 Mbps) 18KB Ethernet (10 Mbps) 122KB T3 (45 Mbps) 549KB FDDI (100 Mbps) 1.2MB STS-3 (155 Mbps) 1.8MB STS-12 (622 Mbps) 7.4MB STS-24 (1.2 Gbps) 14.8MB 23-Feb-19 4/598N: Computer Networks

Apply scaling factor to advertised window Large Windows Apply scaling factor to advertised window Specifies how many bits window must be shifted to the left Scaling factor exchanged during connection setup 23-Feb-19 4/598N: Computer Networks

TCP Tahoe (distributed with 4.3BSD Unix) TCP Flavors Tahoe, Reno, Vegas TCP Tahoe (distributed with 4.3BSD Unix) Original implementation of van Jacobson’s mechanisms (VJ paper) Includes: Slow start (exponential increase of initial window) Congestion avoidance (additive increase of window) Fast retransmit (3 duplicate acks) 23-Feb-19 4/598N: Computer Networks

TCP Reno 1990: includes: All mechanisms in Tahoe Addition of fast-recovery (opening up window after fast retransmit) Delayed acks (to avoid silly window syndrome) Header prediction (to improve performance) 23-Feb-19 4/598N: Computer Networks