EE 122: Lecture 10 (Congestion Control)

Slides:



Advertisements
Similar presentations
Simulation-based Comparison of Tahoe, Reno, and SACK TCP Kevin Fall & Sally Floyd Presented: Heather Heiman September 10, 2002.
Advertisements

Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
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.
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.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 TCP Congestion Control: AIMD and Binomial Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
CS 268: Congestion Control and Avoidance Kevin Lai Feb 4, 2002.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim
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.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
1 Lecture 9: TCP and Congestion Control Slides adapted from: Congestion slides for Computer Networks: A Systems Approach (Peterson and Davis) Chapter 3.
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.
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.
Advanced Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
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.
TCP CS 168 Discussion Week 6 Many thanks to past EE 122 GSIs.
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.
1 TCP - Part II Relates to Lab 5. This is an extended module that covers TCP data transport, and flow control, congestion control, and error control in.
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.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
Network Protocols: Design and Analysis Polly Huang EE NTU
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.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
CS 6401 Congestion Control in TCP Outline Overview of RENO TCP Reacting to Congestion SS/AIMD example.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
CS 268: Lecture 5 (TCP Congestion Control) Ion Stoica February 4, 2004.
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.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
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.
CS450 – Introduction to Networking Lecture 19 – Congestion Control (2)
9.6 TCP Congestion Control
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
COMP 431 Internet Services & Protocols
Congestion Control.
Introduction to Congestion Control
EECS 122: Introduction to Computer Networks 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.
Congestion Control in TCP
CS 268: Lecture 4 (TCP Congestion Control)
TCP Tutorial - Part III -
Chapter 6 TCP Congestion Control
CS640: Introduction to Computer Networks
CS 268: Lecture 5 (TCP Congestion Control)
EECS 122: Introduction to Computer Networks Midterm II Review
State Transition Diagram
If both sources send full windows, we may get congestion collapse
CS4470 Computer Networking Protocols
Transport Layer: Congestion Control
Presentation transcript:

EE 122: Lecture 10 (Congestion Control) Ion Stoica September 26, 2001

Problem How much traffic do you send? Two components flow control make sure that the receiver can receive as fast as you send congestion control make sure that the network delivers the packets to the receiver istoica@cs.berkeley.edu

Why do You Care About Congestion Control? Otherwise you get to congestion collapse How might this happen? assume network is congested (a router drops packets) you learn the receiver didn’t get the packet either by ACK or Timeout what do you do? retransmit packet still receiver didn’t get the packet (because it is dropped again) retransmit again …. and so on … and now assume that everyone is doing the same! Network will become more and more congested and this with duplicate packets rather than new packets! istoica@cs.berkeley.edu

Solutions? Increase buffer size. Why not? Slow down Questions: If you know that your packets are not delivered because network congestion, slow down Questions: How do you detect network congestion? By how much do you slow down? istoica@cs.berkeley.edu

What’s Really Happening? packet loss knee cliff Knee – point after which throughput increases very slow delay increases fast Cliff – point after which throughput starts to decrease very fast to zero (congestion collapse) delay approaches infinity Throughput congestion collapse Load Delay Load istoica@cs.berkeley.edu

Congestion Control vs. Congestion Avoidance Congestion control goal Stay left of cliff Congestion avoidance goal Stay left of knee knee cliff Throughput congestion collapse Load istoica@cs.berkeley.edu

Administrative Stuff 1st midterm, October 9, 9:30 am Close book No notes You’ll be given any formula, if you need it No calculator You’ll have only simple calculation 2nd homework available on-line, due on October 4, 9:30 am 6slides/page handouts, with large slides In general, we cannot put the on-line right away because the department doesn’t have access to Acrobat Distiller istoica@cs.berkeley.edu

Goals Operate near the knee point Remain in equilibrium How to maintain equilibrium? Don’t put a packet into network until another packet leaves. How do you do it? Use ACK: send a new packet only after you receive and ACK (self-clocking) This maintains the number of packets in network “constant” istoica@cs.berkeley.edu

How Do You Do It? Detect when network approaches/reaches knee point Stay there Questions How do you get there? What if you overshoot (i.e., go over knee point) ? Possible solution: Increase window size until you notice congestion Decrease window size if network congested istoica@cs.berkeley.edu

Congestion Window (cwnd) Limits how much data can be in transit MaxWindow = min(cwnd, AdvertisedWindow) EffectiveWindow = MaxWindow – (LastByteSent – LastByteAcked) LastByteAcked LastByteSent sequence number increases istoica@cs.berkeley.edu

TCP: Slow Start Goal: discover congestion quickly How? Quickly increase cwnd until network congested  get a rough estimate of the optimal of cwnd How do we know when network is congested? Packet loss (TCP) Over the cliff  congestion control Congestion notification (DEC Bit scheme) Over the knee but before the cliff  congestion avoidance How do we know a packet is lost?

TCP: Slow Start 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++). Does Slow Start increment slowly? Not really. In fact, the increase of cwnd is exponential istoica@cs.berkeley.edu

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

Congestion Avoidance Goal: maintain operating point at the left of the cliff: How? Additive increase: starting from the rough estimate, slowly increase cwnd to probe for additional available bandwidth Multiplicative decrease: cut congestion window size aggressively if a timeout occurs

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 acknowledged. ssthresh – slow start threshold (more about ssthresh latter) istoica@cs.berkeley.edu

Slow Start/Congestion Avoidance Example Assume that ssthresh = 8 Cwnd (in segments) ssthresh Roundtrip times istoica@cs.berkeley.edu

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;

The big picture cwnd Timeout Congestion Avoidance Slow Start Time

Packet Loss Detection Wait for Retransmission Time Out (RTO) What’s the problem with this? Because RTO is performance killer In BSD TCP implementation, RTO is usually more than 1 second the granularity of RTT estimate is 500 ms retransmission timeout is at least two times of RTT Solution: Don’t wait for RTO to expire istoica@cs.berkeley.edu

Fast Retransmit Resend a segment after 3 duplicate ACKs Notes: Remember, a duplicate ACK means that an out-of sequence segment was received Notes: Duplicate ACKs due packet reordering! If window is small don’t get duplicate ACKs! segment 1 cwnd = 1 ACK 2 cwnd = 2 segment 2 segment 3 ACK 3 ACK 4 cwnd = 4 segment 4 segment 5 segment 6 ACK 4 segment 7 ACK 4 3 duplicate ACKs istoica@cs.berkeley.edu

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 istoica@cs.berkeley.edu

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

Congestion Control Summary Architecture: end system detects congestion and slow down Starting point: Slow start/congestion avoidance packet drop detected by retransmission timeout RTO as congestion signal Fast retransmission/fast recovery packet drop detected by (three) duplicate acks Router support Binary feedback scheme: explicit signaling Today Explicit Congestion Notification [RF99] (we’ll see more in Lecture 11) istoica@cs.berkeley.edu