CS 268: Congestion Control and Avoidance Kevin Lai Feb 4, 2002.

Slides:



Advertisements
Similar presentations
Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.
Advertisements

CSE534 – Fundamentals of Computer Networks Lecture 8-9: Transport (UDP, but mostly TCP) Based on slides by D. Choffnes Northeastern U Revised by P. Gill.
1 TCP Congestion Control. 2 TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement.
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
TCP Congestion Control Dina Katabi & Sam Madden nms.csail.mit.edu/~dina 6.033, Spring 2014.
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.
Congestion Control Tanenbaum 5.3, /12/2015Congestion Control (A Loss Based Technique: TCP)2 What? Why? Congestion occurs when –there is no reservation.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 TCP Congestion Control: AIMD and Binomial Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim
15-744: Computer Networking L-10 Congestion Control.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #7 TCP New Reno Vs. Reno.
1 Internet Networking Spring 2002 Tutorial 10 TCP NewReno.
CS 268: Wireless Transport Protocols Kevin Lai Feb 13, 2002.
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.
1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control Presented by Bob Kinicki.
TCP in Heterogeneous Network Md. Ehtesamul Haque # P.
CMPE 257 Spring CMPE 257: Wireless and Mobile Networking Spring 2005 E2E Protocols (point-to-point)
L13: Sharing in network systems Dina Katabi Spring Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans.
1 EE 122: Advanced TCP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 15: Congestion Control I Slides used with.
CS540/TE630 Computer Network Architecture Spring 2009 Tu/Th 10:30am-Noon Sue Moon.
Transport Layer1 Flow and Congestion Control Ram Dantu (compiled from various text books)
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
CSE 461 University of Washington1 Topic How TCP implements AIMD, part 1 – “Slow start” is a component of the AI portion of AIMD Slow-start.
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
1 Mao W07 Midterm Review EECS 489 Computer Networks Z. Morley Mao Monday Feb 19, 2007 Acknowledgement: Some.
Lecture 9 – More TCP & Congestion Control
What is TCP? Connection-oriented reliable transfer Stream paradigm
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
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:
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Congestion Control Computer Science Division Department of Electrical Engineering and Computer.
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.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks TCP.
The Macroscopic behavior of the TCP Congestion Avoidance Algorithm.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
Peer-to-Peer Networks 13 Internet – The Underlay Network
 Last Class  Resource Allocation  This Class  Chapter 6.3. ~ 6.4.  TCP congestion control.
CS 268: Lecture 5 (TCP Congestion Control) Ion Stoica February 4, 2004.
CS 268: Transport and Congestion Control Lecture 5 February 2, 2005.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
1 Flow & Congestion Control Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
TCP over Wireless PROF. MICHAEL TSAI 2016/6/3. TCP Congestion Control (TCP Tahoe) Only ACK correctly received packets Congestion Window Size: Maximum.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Chapter 3 outline 3.1 transport-layer services
Introduction to Congestion Control
EECS 122: Introduction to Computer Networks Congestion Control
TCP Congestion Control
TCP Congestion 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.
Flow and Congestion Control
Lecture 19 – TCP Performance
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.
CS 268: Lecture 4 (TCP Congestion Control)
CS640: Introduction to Computer Networks
CS 268: Lecture 5 (TCP Congestion Control)
TCP Congestion Control
Administrivia Review 1 Office hours moving to Thursday 10—12
TCP Congestion Control
EE 122: Lecture 10 (Congestion Control)
Transport Layer: Congestion Control
TCP flow and congestion control
Presentation transcript:

CS 268: Congestion Control and Avoidance Kevin Lai Feb 4, 2002

Problem  At what rate do you send data? -What is max useful sending rate for different apps?  two components -flow control make sure that the receiver can receive sliding-window based flow control: ¢ receiver reports window size to sender ¢ higher window  higher throughput ¢ throughput = wnd/RTT -congestion control make sure that the network can deliver

Goals  Robust -latency: 50us (LAN), 133ms (min, anywhere on Earth, wired), 1s (satellite), 260s (ave Mars) difference -bandwidth: 9.6Kb/s (then modem, now cellular), 10 Tb/s 10 9 difference % packet loss -path may change in middle of session (why?) -network may/may not support explicit congestion signaling incremental deployment  Distributed control (survivability)

Non-decreasing Efficiency under Load  Efficiency = useful_work/time  critical property of system design -network technology, protocol or application  otherwise, system collapses exactly when most demand for its operation  trade lower overall efficiency for this? Load Efficiency knee cliff ok?good

Congestion Collapse  Decrease of network efficiency under load  Waste resources on useless or undelivered data  All layers -load  increased control traffic (e.g. BGP bug)  Network layer -load  drops,  1 fragment dropped  Transport layer -retransmit too many times -no congestion control / avoidance  Application layer -load  delay, user uninterested once data arrives -load  delay, user aborts uncompleted session

Transport Layer Congestion Collapse 1  network is congested (a router drops packets)  the receiver didn’t get a packet -know from timeout [JK88], and/or duplicate ack [FF95]  retransmit packet  wait, but not long enough (why?) -timeout too short, or -more acks of following packets  retransmit again  rinse, repeat  assume that everyone is doing the same  network will become more and more congested -with duplicate packets rather than new packets

Transport Layer Congestion Collapse 1 Solutions  Fix timeout [JK88] -keep mean RTT using low pass filter (why?) -keep variance of RTT (actually (mean_deviation) 2, why?) -timeout = a + 4v -assumes delays have poisson/normal distribution (from queueing theory) -still good enough? -always use timeout to detect packet loss?

Transport Layer Congestion Collapse 2  Waste resources on undelivered data  A flow sends data at a high rate despite loss  Its packets consume bandwidth at earlier links, only to be dropped at a later link 90% loss bw wasted ignores loss Penalized

Congestion Collapse and Efficiency  knee – point after which -throughput increases slowly -delay increases quickly  cliff – point after which -throughput decreases quickly to zero (congestion collapse) -delay goes to infinity  Congestion avoidance -stay at knee  Congestion control -stay left of (but usually close to) cliff  Note (in an M/M/1 queue) -delay = 1/(1 – utilization) Load Throughput Delay kneecliff over utilization under utilization saturation congestion collapse

Transport Layer Congestion Collapse 2 Solutions  Reduce loss by increasing buffer size. Why not?  if congestion, then send slower else if sending at lower than fair rate, then send faster -congestion control and avoidance (finally) -how to detect network congestion? -how to communicate allocation to sources? -how to determine efficient allocation? -how to determine fair allocation?

Metrics  Efficiency -ratio of aggregate throughput to capacity  Fairness -degree to which everyone is getting equal share  Convergence time (responsiveness) -How long to get to fairness, efficiency  Size of oscillation (smoothness) -dynamic system  oscillations around optimal point

Detecting Congestion  Explicit network signal -Send packet back to source (e.g. ICMP Source Quench) control traffic congestion collapse -Set bit in header (e.g. DEC DNA/OSI Layer 4[CJ89], ECN) can be subverted by selfish receiver [SEW01] -Unless on every router, still need end-to-end signal -Could be be robust, if deployed (DoS?)  Implicit network signal -Loss (e.g. TCP Tahoe, Reno, New Reno, SACK) +relatively robust, -no avoidance -Delay (e.g. TCP Vegas) +avoidance, -difficult to make robust -Easily deployable -Robust enough? Wireless?

Communicating Allocation to Sources  Explicit -Send packet back to source or set in packet header control traffic congestion collapse trust receiver -Need to keep per flow state (anti-Internet architecture) what happens if router fails, route changes, mobility -Unless on every router, still need end-to-end signal -Efficient, fair, responsive, smooth  Implicit: Chiu and Jain Can converge to efficiency and fairness without explicit signal of fair rate -Easily deployable -Good enough?

Efficient Allocation  Too slow -fail to take advantage of available bandwidth  underload  Too fast -overshoot knee  overload, high delay, loss  Everyone’s doing it -may all under/over shoot  large oscillations  Optimal: -  x i =X goal  Efficiency = 1 - distance from efficiency line User 1: x 1 User 2: x 2 Efficiency line 2 user example overload underload

Fair Allocation  Maxmin fairness -flows which share the same bottleneck get the same amount of bandwidth  Assumes no knowledge of priorites  Fairness = 1 - distance from fairness line User 1: x 1 User 2: x 2 2 user example 2 getting too much 1 getting too much fairness line

Control System Model [CJ89]  Simple, yet powerful model  Explicit binary signal of congestion -why explicit (TCP uses implicit)?  Implicit allocation of bandwidth User 1 User 2 User n x1x1 x2x2 xnxn   x i > X goal y

Possible Choices  multiplicative increase, additive decrease -a I =0, b I >1, a D <0, b D =0  additive increase, additive decrease -a I >0, b I =0, a D <0, b D =0  multiplicative increase, multiplicative decrease -a I =0, b I >1, a D =0, 0<b D <1  additive increase, multiplicative decrease -a I >0, b I =0, a D =0, 0<b D <1  Which one?

Multiplicative Increase, Additive Decrease User 1: x 1 User 2: x 2 fairness line efficiency line (x 1h,x 2h ) (x 1h +a D,x 2h +a D ) (b I (x 1h +a D ), b I (x 2h +a D ))  Does not converge to fairness -Not stable at all  Does not converges to efficiency -stable iff

Additive Increase, Additive Decrease User 1: x 1 User 2: x 2 fairness line efficiency line (x 1h,x 2h ) (x 1h +a D,x 2h +a D ) (x 1h +a D +a I ), x 2h +a D +a I ))  Does not converge to fairness -stable  Does not converge to efficiency -stable iff

Multiplicative Increase, Multiplicative Decrease User 1: x 1 User 2: x 2 fairness line efficiency line (x 1h,x 2h ) (b d x 1h,b d x 2h ) (b I b D x 1h, b I b D x 2h )  Does not converge to fairness -stable  Converges to efficiency iff

(b I b D x 1h +a I, b I b D x 2h +a I ) Additive and Multiplicative Increase, Multiplicative Decrease User 1: x 1 User 2: x 2 fairness line efficiency line (x 1h,x 2h ) (b D x 1h,b D x 2h )  Converges to fairness  Converges to efficiency iff -b I >=1  Increments smaller as fairness increases -effect on metrics?  Additive Increase is better -why?

Significance  Characteristics -converges to efficiency, fairness -easily deployable -fully distributed -no need to know full state of system (e.g. number of users, bandwidth of links) (why good?)  Theory that enabled the Internet to grow beyond key milestone in Internet development -fully distributed network architecture requires fully distributed congestion control -basis for TCP

Modeling  Critical to understanding complex systems -[CJ89] model relevant for 13 years, 10 6 increase of bandwidth, 1000x increase in number of users  Criteria for good models -realistic -simple easy to work with easy for others to understand -realistic, complex model  useless -unrealistic, simple model  can teach something about best case, worst case, etc.

TCP Congestion Contol  [CJ89] provides theoretical basis -still many issues to be resolved  How to start?  Implicit congestion signal -loss -need to send packets to detect congestion -must reconcile with AIMD  How to maintain equilibrium? -use ACK: send a new packet only after you receive and ACK. Why? -maintain number of packets in network “constant”

1/18/ TCP Congestion Control  Maintains three variables: -cwnd – congestion window -flow_win – flow window; receiver advertised window -ssthresh – threshold size (used to update cwnd)  For sending use: win = min(flow_win, cwnd)

1/18/ TCP: Slow Start  Goal: discover congestion quickly  How? -quickly increase cwnd until network congested  get a rough estimate of the optimal of cwnd -Whenever starting traffic on a new connection, or whenever increasing traffic after congestion was experienced: Set cwnd =1 Each time a segment is acknowledged increment cwnd by one (cwnd++).  Slow Start is not actually slow -cwnd increases exponentially

Slow Start Example  The congestion window size grows very rapidly  TCP slows down the increase of cwnd when cwnd >= ssthresh ACK for segment 1 segment 1 cwnd = 1 cwnd = 2 segment 2 segment 3 ACK for segments cwnd = 4 segment 4 segment 5 segment 6 segment 7 ACK for segments cwnd = 8

Congestion Avoidance  Slow down “Slow Start”  If cwnd > ssthresh then each time a segment is acknowledged increment cwnd by 1/cwnd (cwnd += 1/cwnd).  So cwnd is increased by one only if all segments have been acknowlegded.  (more about ssthresh latter)

Slow Start/Congestion Avoidance Example  Assume that ssthresh = 8 Roundtrip times Cwnd (in segments) ssthresh

1/18/ Putting Everything Together: TCP Pseudocode Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = win/2; cwnd = 1; while (next < unack + win) transmit next packet; where win = min(cwnd, flow_win); unacknext win seq #

1/18/ The big picture Time cwnd Timeout Slow Start Congestion Avoidance

Fast Retransmit  Don’t wait for window to drain  Resend a segment after 3 duplicate ACKs -remember a duplicate ACK means that an out-of sequence segment was received  Notes: -duplicate ACKs due to packet reordering why reordering? -iwindow may be too small to get duplicate ACKs ACK 1 segment 1 cwnd = 1 cwnd = 2 segment 2 segment 3 ACK 3 cwnd = 4 segment 4 segment 5 segment 6 segment 7 ACK 1 3 duplicate ACKs ACK 4

Fast Recovery  After a fast-retransmit set cwnd to ssthresh/2 -i.e., don’t reset cwnd to 1  But when RTO expires still do cwnd = 1  Fast Retransmit and Fast Recovery  implemented by TCP Reno; most widely used version of TCP today

1/18/ Fast Retransmit and Fast Recovery  Retransmit after 3 duplicated acks -prevent expensive timeouts  No need to slow start again  At steady state, cwnd oscillates around the optimal window size. Time cwnd Slow Start Congestion Avoidance

Reflections on TCP  assumes that all sources cooperate  assumes that congestion occurs on time scales greater than 1 RTT  only useful for reliable, in order delivery, non-real time applications  vulnerable to non-congestion related loss (e.g. wireless)  can be unfair to long RTT flows