Congestion Control.

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

TCP Congestion Control
ECE 4450:427/527 - Computer Networks Spring 2015
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth Edition,Peterson.
Introduction 1 Lecture 14 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
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.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
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.
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.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
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.
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
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.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
TCP Congestion Control Computer Networks TCP Congestion Control 1.
Spring 2009CSE Congestion Control Outline Resource Allocation Queuing TCP Congestion Control.
TCP Congestion Control
Advance Computer Networks Lecture#09 & 10 Instructor: Engr. Muhammad Mateen Yaqoob.
CS 6401 Congestion Control in TCP Outline Overview of RENO TCP Reacting to Congestion SS/AIMD example.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
Spring Computer Networks1 Congestion Control II Outline Queuing Discipline Reacting to Congestion Avoiding Congestion DECbit Random Early Detection.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
9.6 TCP Congestion Control
Transport Layer CS 381 3/7/2017.
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
CS-1652 Jack Lange University of Pittsburgh
COMP 431 Internet Services & Protocols
Congestion Control Outline Queuing Discipline Reacting to Congestion
Congestion Control Outline Queuing Discipline Reacting to Congestion
Chapter 3 outline 3.1 Transport-layer services
Congestion Control Outline Queuing Discipline Reacting to Congestion
Chapter 5 TCP Transmission Control
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.
Flow and Congestion Control
Lecture 19 – TCP Performance
ECE 4450:427/527 - Computer Networks Spring 2017
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
CSS432 Congestion Control Textbook Ch6.1 – 6.4
Chapter 6 TCP Congestion Control
If both sources send full windows, we may get congestion collapse
TCP Congestion Control
CS4470 Computer Networking Protocols
TCP Congestion Control
TCP Overview.
EE 122: Lecture 10 (Congestion Control)
Congestion Control in TCP
Advanced Computer Networks
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP flow and congestion control
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Congestion Michael Freedman COS 461: Computer Networks
Presentation transcript:

Congestion Control

Congestion Control What is congestion? Methods for dealing with congestion TCP congestion control

Review of Flow Control Receiver advertises window in ACK packets Receiver window size = amount of free space in receive buffer Sender will limit number of unACK’ed packets to receiver window Invariant: every packet that arrives at receiver can be buffered

Flow Control Sender Receiver recv window = 5 recv window = 0

Flow Control, Cont’d Sender Receiver recv wind = 2 recv wind = 2

Flow Control Justification TCP flow control is conservative Only send data if receiver is sure to have space for it Consider aggressive alternative Send data optimistically, hoping receiver has space for it If receiver can’t buffer packet, simply discard Which is more efficient?

Efficiency Metrics Transmission speed Network utilization Get as many bytes from sender to receiver as quickly as possible Network utilization Maximize “goodput” Fraction of bytes spent on delivering new, useful data E.g. delayed ack hurts transmission speed, but improves network utilization

Congestion What is congestion? What are effects of congestion? Higher rate of inputs to a router than outputs What are effects of congestion? Delays Loss What layer does congestion occur at? Network layer So why are we talking about it now?

Congestion, simple case Assume: Sender transmits at full line rate (i.e. receiver window infinite) Instant, free, precise loss notification No other traffic on network 10 Mbps 5 Mbps Sender Router Receiver

Congestion, two senders Assume: Each sender transmits at 1/2 line rate Sender 1 Receiver 1 5 Mbps Effective throughput on S1->R1 is still 5 Mbps Effective throughput on S2 ->R2 is only 10 Mbps 20 Mbps Router Sender 2 20 Mbps Receiver 2

Congestion and Delays During congestion, delay is much greater than ordinary delay Since loss notification is imperfect, may retransmit packets still in the queue! queue Sender Router retransmission original

Congestion Problems Excessive queueing delays Wasted network capacity on retransmissions Could have been used by other flows Situation gets worse with multi-hop paths Wasteful retransmit of prematurely timed out packets How bad does it get? 1000-fold reduction in bandwidth!

Congestion Control Congestion control involves two tasks: Detect congestion Limit sending rate Today we look at TCP approach to this

TCP Congestion Control Idea Assumes best-effort network FIFO or FQ Each source determines network capacity for itself Implicit feedback ACKs pace transmission (self-clocking) Challenge Determining initial available capacity Adjusting to changes in capacity in a timely manner

TCP Congestion Control Basic idea Add notion of congestion window Effective window is smaller of Advertised window (flow control) Congestion window (congestion control) Changes in congestion window size Slow increases to absorb new bandwidth Quick decreases to eliminate congestion

TCP Congestion Control Specific strategy Self-clocking Send data only when outstanding data ACK’d Equivalent to send window limitation mentioned Growth Add one maximum segment size (MSS) per congestion window of data ACK’d It’s really done this way, at least in Linux: see tcp_cong_avoid in tcp_input.c. Actually, every ack for new data is treated as an MSS ACK’d Known as additive increase

TCP Congestion Control Specific strategy (continued) Decrease Cut window in half when timeout occurs In practice, set window = window /2 Known as multiplicative decrease Additive increase, multiplicative decrease (AIMD)

Additive Increase/ Multiplicative Decrease Objective Adjust to changes in available capacity Tools React to observance of congestion Probe channel to detect more resources Observation On notice of congestion Decreasing too slowly will not be reactive enough On probe of network Increasing too quickly will overshoot limits

Additive Increase/ Multiplicative Decrease New TCP state variable CongestionWindow Similar to AdvertisedWindow for flow control Limits how much data source can have in transit MaxWin = MIN(CongestionWindow, AdvertisedWindow) EffWin = MaxWin - (LastByteSent - LastByteAcked) TCP can send no faster then the slowest component, network or destination Idea Increase CongestionWindow when congestion goes down Decrease CongestionWindow when congestion goes up

Additive Increase/ Multiplicative Decrease Question How does the source determine whether or not the network is congested? Answer Timeout signals packet loss Packet loss is rarely due to transmission error (on wired lines) Lost packet implies congestion!

Additive Increase/ Multiplicative Decrease Algorithm Increment CongestionWindow by one packet per RTT Linear increase Divide CongestionWindow by two whenever a timeout occurs Multiplicative decrease Source Destination …

Additive Increase/ Multiplicative Decrease Sawtooth trace 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 KB T ime (seconds) 70 30 40 50 10 10.0

TCP Start Up Behavior How should TCP start sending data? AIMD is good for channels operating at capacity AIMD can take a long time to ramp up to full capacity from scratch Use Slow Start to increase window rapidly from a cold start

TCP Start Up Behavior Initialization of the congestion window Congestion window should start small Avoid congestion due to new connections Start at 1 MSS, reset to 1 MSS with each timeout (note that timeouts are coarse-grained, ~1/2 sec) Known as slow start

Slow Start Objective Idea Result Used Determine initial available capacity Idea Begin with CongestionWindow = 1 packet Double CongestionWindow each RTT Increment by 1 packet for each ACK Continue increasing until loss Result Exponential growth Slower than all at once Used When first starting connection When connection times out Source Destination …

TCP Congestion Control To make up for slow start, ramp up congestion window quickly Maintain threshold window size Use multiplicative increase When congestion window smaller than threshold Double window for each window ACK’d Threshold value Initially set to maximum window size Set to 1/2 of current window on timeout In practice, increase congestion window by one MSS for each ACK of new data (or N bytes for N bytes)

Slow Start How long should the exponential increase from slow start continue? New variable: target window size CongestionThreshold Estimate network capacity When CongestionWindow reaches CongestionThreshold switch to additive increase Initial values CongestionThreshold = 8 CongestionWindow = 1 Loss after transmission 7 CongestionWindow currently 12 Set Congestionthreshold = CongestionWindow/2 Set CongestionWindow = 1

Slow Start Example trace of CongestionWindow Problem 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 KB 70 30 40 50 10 CW flattens out due to loss Linear increase Slow start until CW = CT Timeout: CT = CT/2 = 11 CW = 1 Problem Have to wait for timeout Can lose half CongestionWindow of data

Fast Retransmit and Fast Recovery Problem Coarse-grain TCP timeouts lead to idle periods Solution Fast retransmit: use duplicate ACKs to trigger retransmission Packet 1 Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Retransmit packet 3 ACK 1 ACK 2 ACK 6 Sender Receiver

Fast Retransmit and Fast Recovery Send ACK for each segment received When duplicate ACK’s received Resend lost segment immediately Do not wait for timeout In practice, retransmit on 3rd duplicate Fast recovery When fast retransmission occurs, skip slow start Congestion window becomes 1/2 previous Start additive increase immediately

Fast Retransmit and Fast Recovery Results 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 KB 70 30 40 50 10 Fast Recovery Bypass slow start phase Increase immediately to one half last successful CongestionWindow (ssthresh)

TCP Congestion Window Trace