1 EE 122: Advanced TCP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,

Slides:



Advertisements
Similar presentations
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling 1 Department of Information Engineering University of Pisa Network Telecomunication.
Advertisements

CSCI-1680 Transport Layer II Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
TCP Variants.
1 EE 122:TCP Congestion Control Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
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.
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.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 16: Congestion control II Slides used with.
EE 122: Congestion Control The Sequel October 1, 2003.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth Edition,Peterson.
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.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Congestion Control Computer Science Division Department of Electrical Engineering and Computer.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 TCP Congestion Control: AIMD and Binomial Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
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.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks TCP Variations Computer Science Division Department of Electrical Engineering and Computer.
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.
Transport: TCP Manpreet Singh (Slides borrowed from various sources on the web)
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.
CMPE 257 Spring CMPE 257: Wireless and Mobile Networking Spring 2005 E2E Protocols (point-to-point)
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
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.
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.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
1 Sonia FahmyPurdue University TCP Congestion Control Sonia Fahmy Department of Computer Sciences Purdue University
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.
Recap of Lecture 19 If symptoms persist, please consult Dr Jacobson.
CS 6401 Congestion Control in TCP Outline Overview of RENO TCP Reacting to Congestion SS/AIMD example.
Congestion Control CS 168 Discussion Week 7. RECAP: How does TCP set rate? How much data can be outstanding? – min{RWND, CWND} RWND: do not overload the.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
 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.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
TCP over Wireless PROF. MICHAEL TSAI 2016/6/3. TCP Congestion Control (TCP Tahoe) Only ACK correctly received packets Congestion Window Size: Maximum.
Other Methods of Dealing with Congestion
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP 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.
Lecture 19 – TCP Performance
Other Methods of Dealing with Congestion
CS 268: Lecture 4 (TCP Congestion Control)
Other Methods of Dealing with Congestion
Chapter 6 TCP Congestion Control
CS640: Introduction to Computer Networks
If both sources send full windows, we may get congestion collapse
EECS 122: Introduction to Computer Networks TCP Variations
TCP Congestion Control
EE 122: Lecture 10 (Congestion Control)
EE 122: Congestion Control The Sequel
Computer Science Division
Transport Layer: Congestion Control
Presentation transcript:

1 EE 122: Advanced TCP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson, Jennifer Rexford, and colleagues at UC Berkeley)

2 Goals of Today’s Lecture Improved TCP algorithms TCP Throughput Computation

3 Slow Start/AIMD 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 = cwnd/2; cwnd = 1;

4 The big picture (with timeouts) Time cwnd Timeout Slow Start AIMD Timeout ssthresh Slow Start AIMD 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 = cwnd/2; cwnd = 1;

5 Congestion Detection Revisited Wait for Retransmission Time Out (RTO) RTO kills throughput In BSD TCP implementations, RTO is usually more than 500ms The granularity of RTT estimate is 500 ms Retransmission timeout is RTT + 4 * mean_deviation Solution: Don’t wait for RTO to expire

6 Fast Retransmits Resend a segment after 3 duplicate ACKs Duplicate ACK means that an out-of sequence segment was received Notes: ACKs are for next expected packet Packet reordering can cause duplicate ACKs Window may be too small to get enough duplicate ACKs ACK 2 segment 1 cwnd = 1 cwnd = 2 segment 2 segment 3 ACK 4 cwnd = 4 segment 4 segment 5 segment 6 segment 7 ACK 3 3 duplicate ACKs ACK 4

7 Fast Recovery: After a Fast Retransmit ssthresh = cwnd / 2 cwnd = ssthresh Instead of setting cwnd to 1, cut cwnd in half (multiplicative decrease) For each dup ack arrival dupack++ Indicates packet left network, so we may be able to send more MaxWindow = min(cwnd + dupack, AdvWin) Receive ack for new data (beyond initial dup ack) dupack = 0 Exit fast recovery But when RTO expires still do cwnd = 1

8 Fast Retransmit and Fast Recovery Retransmit after 3 duplicated acks Prevent expensive timeouts Reduce slow starts At steady state, cwnd oscillates around the optimal window size Time cwnd Slow Start AI/MD Fast retransmit

9 TCP Congestion Control Summary Measure available bandwidth Slow start: fast, hard on network AIMD: slow, gentle on network Detecting congestion Timeout based on RTT Robust, causes low throughput Fast Retransmit: avoids timeouts when few packets lost Can be fooled, maintains high throughput Recovering from loss Fast recovery: don’t set cwnd=1 with fast retransmits

10 TCP Flavors TCP-Tahoe cwnd =1 whenever drop is detected TCP-Reno cwnd =1 on timeout cwnd = cwnd/2 on dupack TCP-newReno TCP-Reno + improved fast recovery TCP-SACK

11 TCP-SACK SACK = Selective Acknowledgements ACK packets identify exactly which packets have arrived Makes recovery from multiple losses much easier

12 Standards? How can all these algorithms coexist? Don’t we need a single, uniform standard? What happens if I’m using Reno and you are using Tahoe, and we try to communicate?

13 TCP Throughput Assume a drop every k’th RTT (for some large k) w, w+1, w+2,...w+k-1 DROP (w+k-1)/2, (w+k-1)/2+1,... w w+1 w+2 w+k-1 (w+k-1)/2 window Time RTT

14 TCP Throughput (cont’d) In steady state: w= (w+k-1)/2  w=k-1 Average window: (w + w + k -1)/2 = 3*w/2 Total packets between drops: n = w+(w+1)+… +2*w = 3*w*(w+1)/2 Drop probability: p = 1/n = 2/(3*w*(w+1)) ~= 2/(3*w 2 ) w w+1 w+2 w+k-1 (w+k-1)/2 window Time RTT

15 TCP Throughput (cont’d) Throughput = average_window/RTT = (3*w/2)/RTT Drop probability: p ~= 2/(3*w 2 )  w = sqrt(2/3p) Throughput ~= (1/RTT)*sqrt(3/2p) w w+1 w+2 2*w (w+k-1)/2 window Time RTT

16 Equation-Based CC Idea: Forget complicated increase/decrease algorithms Use this equation T(p) directly! Approach: Measure drop rate (don’t need ACKs for this) Send drop rate p to source Source sends at rate T(p) Good for streaming audio/video that can’t tolerate the high variability of TCP’s sending rate

17 5 Minute Break Questions Before We Proceed?

18 Cheating Three main ways to cheat: Increasing cwnd faster than 1 per RTT Using large initial cwnd Opening many connections

19 Increasing cwnd Faster AB x DE y Limit rates: x = 2y C x y x increases by 2 per RTT y increases by 1 per RTT

20 Increasing cwnd Faster AB x DE y

21 Larger Initial cwnd AB x DE y x starts SS with cwnd = 4 y starts SS with cwnd = 1

22 Open Many Connections AB x DE y Assume A starts 10 connections to B D starts 1 connection to E Each connection gets about the same throughput Then A gets 10 times more throughput than D

23 Cheating and Game Theory AB x DE y 22, 2210, 35 35, 1015, 15 (x, y) A Increases by 1 Increases by 5 D  Increases by 1 Increases by 5 Individual incentives: cheating pays Social incentives: better off without cheating Classic Prisoner Dilemma: resolution depends on accountability Too aggressive  Losses  Throughput falls

24 Lossy Links TCP assumes that all losses are due to congestion What happens when the link is lossy? Recall that Tput ~ 1/sqrt(p) where p is loss prob. This applies even for non-congestion losses

25 Example p = 0 p = 1% p = 10%

26 Summary Congestion control critical for avoiding collapse AIMD: Additive Increase, Multiplicative Decrease Congestion detected via packet loss (fail-safe) Slow start to find initial sending rate & to restart after timeout Spectrum of TCP mechanisms to improve TCP performance Fast Retransmit (avoid RTO stall) Fast Recovery (full AIMD)