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.

Slides:



Advertisements
Similar presentations
TCP Variants.
Advertisements

Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
TCP Congestion Control
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.
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.
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.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
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.
Transport Layer Congestion control. Transport Layer 3-2 Approaches towards congestion control End-to-end congestion control: r no explicit feedback.
1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
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)
TCP Congestion Control
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
Transport Layer 4 2: Transport Layer 4.
Network Technologies essentials Week 8: TCP congestion control Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall, University.
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
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.
Computer Science & Engineering Introduction to Computer Networks Congestion Overview (§6.3, §6.5.10)
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
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
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.
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.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Fairness of Bandwidth Allocation (§6.3.1)
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
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.
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.
Recap Slow start introduced cwnd Slow start introduced cwnd Can transmit up to Can transmit up to min( cwnd, offered window ) Flow control by the sender.
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.
 Last Class  Resource Allocation  This Class  Chapter 6.3. ~ 6.4.  TCP congestion control.
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.
Transport Layer CS 381 3/7/2017.
Chapter 3 outline 3.1 transport-layer services
COMP 431 Internet Services & Protocols
Introduction to 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
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
CS640: Introduction to Computer Networks
TCP Congestion Control
EE 122: Lecture 10 (Congestion Control)
Transport Layer: Congestion Control
TCP flow and congestion control
Presentation transcript:

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

CSE 461 University of Washington2 Recall We want TCP to follow an AIMD control law for a good allocation Sender uses a congestion window or cwnd to set its rate (≈cwnd/RTT) Sender uses packet loss as the network congestion signal Need TCP to work across a very large range of rates and RTTs

CSE 461 University of Washington3 TCP Startup Problem We want to quickly near the right rate, cwnd IDEAL, but it varies greatly – Fixed sliding window doesn’t adapt and is rough on the network (loss!) – AI with small bursts adapts cwnd gently to the network, but might take a long time to become efficient

CSE 461 University of Washington4 Slow-Start Solution Start by doubling cwnd every RTT – Exponential growth (1, 2, 4, 8, 16, …) – Start slow, quickly reach large values AI Fixed Time Window (cwnd) Slow-start

CSE 461 University of Washington5 Slow-Start Solution (2) Eventually packet loss will occur when the network is congested – Loss timeout tells us cwnd is too large – Next time, switch to AI beforehand – Slowly adapt cwnd near right value In terms of cwnd: – Expect loss for cwnd C ≈ 2BD+queue – Use ssthresh = cwnd C /2 to switch to AI

CSE 461 University of Washington6 Slow-Start Solution (3) Combined behavior, after first time – Most time spend near right value AI Fixed Time Window ssthresh cwnd C cwnd IDEAL AI phase Slow-start

Slow-Start (Doubling) Timeline CSE 461 University of Washington7 Increment cwnd by 1 packet for each ACK

Additive Increase Timeline CSE 461 University of Washington8 Increment cwnd by 1 packet every cwnd ACKs (or 1 RTT)

CSE 461 University of Washington9 TCP Tahoe (Implementation) Initial slow-start (doubling) phase – Start with cwnd = 1 (or small value) – cwnd += 1 packet per ACK Later Additive Increase phase – cwnd += 1/cwnd packets per ACK – Roughly adds 1 packet per RTT Switching threshold (initially infinity) – Switch to AI when cwnd > ssthresh – Set ssthresh = cwnd/2 after loss – Begin with slow-start after timeout

CSE 461 University of Washington10 Timeout Misfortunes Why do a slow-start after timeout? – Instead of MD cwnd (for AIMD) Timeouts are sufficiently long that the ACK clock will have run down – Slow-start ramps up the ACK clock We need to detect loss before a timeout to get to full AIMD – Done in TCP Reno

CSE 461 University of Washington11 Topic How TCP implements AIMD, part 2 – “Fast retransmit” and “fast recovery” are the MD portion of AIMD AIMD sawtooth

CSE 461 University of Washington12 Inferring Loss from ACKs TCP uses a cumulative ACK – Carries highest in-order seq. number – Normally a steady advance Duplicate ACKs give us hints about what data hasn’t arrived – Tell us some new data did arrive, but it was not next segment – Thus the next segment may be lost

CSE 461 University of Washington13 Fast Retransmit Treat three duplicate ACKs as a loss – Retransmit next expected segment – Some repetition allows for reordering, but still detects loss quickly Ack

Fast Retransmit (2) CSE 461 University of Washington14 Ack 10 Ack 11 Ack 12 Ack Ack 13 Data Ack 13 Ack Data 20 Third duplicate ACK, so send 14 Retransmission fills in the hole at 14 ACK jumps after loss is repaired... Data 14 was lost earlier, but got 15 to 20

CSE 461 University of Washington15 Fast Retransmit (3) It can repair single segment loss quickly, typically before a timeout However, we have quiet time at the sender/receiver while waiting for the ACK to jump And we still need to MD cwnd …

CSE 461 University of Washington16 Inferring Non-Loss from ACKs Duplicate ACKs also give us hints about what data has arrived – Each new duplicate ACK means that some new segment has arrived – It will be the segments after the loss – Thus advancing the sliding window will not increase the number of segments stored in the network

CSE 461 University of Washington17 Fast Recovery First fast retransmit, and MD cwnd Then pretend further duplicate ACKs are the expected ACKs – Lets new segments be sent for ACKs – Reconcile views when the ACK jumps Ack

Fast Recovery (2) CSE 461 University of Washington18 Ack 12 Ack 13 Data 14 Ack 13 Ack Data 20 Third duplicate ACK, so send 14 Data 14 was lost earlier, but got 15 to 20 Retransmission fills in the hole at 14 Set ssthresh, cwnd = cwnd/2 Data 21 Data 22 More ACKs advance window; may send segments before jump Ack 13 Exit Fast Recovery

CSE 461 University of Washington19 Fast Recovery (3) With fast retransmit, it repairs a single segment loss quickly and keeps the ACK clock running This allows us to realize AIMD – No timeouts or slow-start after loss, just continue with a smaller cwnd TCP Reno combines slow-start, fast retransmit and fast recovery – Multiplicative Decrease is ½

TCP Reno CSE 461 University of Washington20 MD of ½, no slow-start ACK clock running TCP sawtooth

CSE 461 University of Washington21 TCP Reno, NewReno, and SACK Reno can repair one loss per RTT – Multiple losses cause a timeout NewReno further refines ACK heuristics – Repairs multiple losses without timeout SACK is a better idea – Receiver sends ACK ranges so sender can retransmit without guesswork

CSE 461 University of Washington22 Topic How routers can help hosts to avoid congestion – Explicit Congestion Notification !!

CSE 461 University of Washington23 Congestion Avoidance vs. Control Classic TCP drives the network into congestion and then recovers – Needs to see loss to slow down Would be better to use the network but avoid congestion altogether! – Reduces loss and delay But how can we do this?

Feedback Signals Delay and router signals can let us avoid congestion CSE 461 University of Washington24 SignalExample ProtocolPros / Cons Packet lossClassic TCP Cubic TCP (Linux) Hard to get wrong Hear about congestion late Packet delayCompound TCP (Windows) Hear about congestion early Need to infer congestion Router indication TCPs with Explicit Congestion Notification Hear about congestion early Require router support

ECN (Explicit Congestion Notification) Router detects the onset of congestion via its queue – When congested, it marks affected packets (IP header) CSE 461 University of Washington25

ECN (2) Marked packets arrive at receiver; treated as loss – TCP receiver reliably informs TCP sender of the congestion CSE 461 University of Washington26

CSE 461 University of Washington27 ECN (3) Advantages: – Routers deliver clear signal to hosts – Congestion is detected early, no loss – No extra packets need to be sent Disadvantages: – Routers and hosts must be upgraded