Lecture 9 – More TCP & Congestion Control

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 and Congestion Control
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
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.
Computer Networking Lecture 17 – More TCP & Congestion Control Copyright ©, Carnegie Mellon University.
1 Computer Networks Transport Layer (Part 4). 2 Transport layer So far… –Transport layer functions –Specific transport layers UDP TCP –In the middle of.
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.
TCP Variations Naveen Manicka CISC 856 – Fall 2005 Computer & Information Sciences University of Delaware Nov 10, 2005 Most slides are borrowed from J.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
15-744: Computer Networking L-10 Congestion Control.
Lecture 18 – TCP Performance
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.
TCP Congestion Control TCP sources change the sending rate by modifying the window size: Window = min {Advertised window, Congestion Window} In other words,
Computer Networks : TCP Congestion Control1 TCP Congestion Control.
Computer Networking Lecture 19 – TCP Performance.
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 Congestion Control
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
Computer Networking Lecture 17 – TCP Performance Dejian Ye, Liu Xin.
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.
Advance Computer Networking
Computer Networking TCP (cont.). Lecture 16: Overview TCP congestion control TCP modern loss recovery TCP interactions TCP options TCP.
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.
Computer Networking Lecture 16 –TCP in detail Eric Anderson Fall
What is TCP? Connection-oriented reliable transfer Stream paradigm
Lecture 18 – More TCP & Congestion 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.
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
TCP End-To-End Congestion Control Wanida Putthividhya Dept. of Computer Science Iowa State University Jan, 27 th 2002 (May, 25 th 2001)
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
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.
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
TCP and Congestion Control(2)
Advance Computer Networking
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.
Other Methods of Dealing with Congestion
CS640: Introduction to Computer Networks
Lecture 18 – More TCP & Congestion Control
If both sources send full windows, we may get congestion collapse
TCP Congestion Control
EE 122: Lecture 10 (Congestion Control)
15-744: Computer Networking
Transport Layer: Congestion Control
Computer Networking TCP.
TCP flow and congestion control
Presentation transcript:

Lecture 9 – More TCP & Congestion Control 15-441 Computer Networking Lecture 9 – More TCP & Congestion Control

TCP congestion control TCP modern loss recovery TCP modeling Overview TCP congestion control TCP modern loss recovery TCP modeling Lecture 9: 09-25-2002

TCP Congestion Control Changes to TCP motivated by ARPANET congestion collapse Basic principles AIMD Packet conservation Reaching steady state quickly ACK clocking Lecture 9: 09-25-2002

AIMD Distributed, fair and efficient Packet loss is seen as sign of congestion and results in a multiplicative rate decrease Factor of 2 TCP periodically probes for available bandwidth by increasing its rate Rate Time Lecture 9: 09-25-2002

Implementation Issue Operating system timers are very coarse – how to pace packets out smoothly? Implemented using a congestion window that limits how much data can be in the network. TCP also keeps track of how much data is in transit Data can only be sent when the amount of outstanding data is less than the congestion window. The amount of outstanding data is increased on a “send” and decreased on “ack” (last sent – last acked) < congestion window Window limited by both congestion and buffering Sender’s maximum window = Min (advertised window, cwnd) Lecture 9: 09-25-2002

Congestion Avoidance If loss occurs when cwnd = W Upon receiving ACK Network can handle 0.5W ~ W segments Set cwnd to 0.5W (multiplicative decrease) Upon receiving ACK Increase cwnd by 1/cwnd Implements AIMD Lecture 9: 09-25-2002

Congestion Avoidance Sequence Plot Sequence No Packets Acks Time Lecture 9: 09-25-2002

Congestion Avoidance Behavior Window Time Cut Congestion Window and Rate Packet loss + Timeout Grabbing back Bandwidth Lecture 9: 09-25-2002

Packet Conservation Packet conservation == at equilibrium, inject packet into network only when one is removed Sliding window and not rate controlled But still need to avoid sending burst of packets  would overflow links Need to carefully pace out packets Helps provide stability Need to eliminate spurious retransmissions Accurate RTO estimation Better loss recovery techniques (e.g. fast retransmit) Lecture 9: 09-25-2002

TCP Packet Pacing Congestion window helps to “pace” the transmission of data packets In steady state, a packet is sent when an ack is received Data transmission remains smooth, once it is smooth Self-clocking behavior Pb Pr Sender Receiver As Ar Ab Lecture 9: 09-25-2002

Reaching Steady State Doing AIMD is fine in steady state but slow… How does TCP know what is a good initial rate to start with? Should work both for a CDPD (10s of Kbps or less) and for supercomputer links (2.4 Gbps and growing) Quick initial phase to help get up to speed (slow start) Lecture 9: 09-25-2002

Slow Start Packet Pacing How do we get this clocking behavior to start? Initialize cwnd = 1 Upon receipt of every ack, cwnd = cwnd + 1 Implications Window actually increases to W in RTT * log2(W) Can overshoot window and cause packet loss Lecture 9: 09-25-2002

Slow Start Example 1 One RTT 0R 2 1R 3 4 2R 5 6 7 8 3R 9 10 11 12 13 One pkt time 0R 2 1R 3 4 2R 5 6 7 8 3R 9 10 11 12 13 14 15 Lecture 9: 09-25-2002

Slow Start Sequence Plot . Sequence No Packets Acks Time Lecture 9: 09-25-2002

Return to Slow Start If packet is lost we lose our self clocking as well Need to implement slow-start and congestion avoidance together When timeout occurs set ssthresh to 0.5w If cwnd < ssthresh, use slow start Else use congestion avoidance Lecture 9: 09-25-2002

TCP Saw Tooth Behavior Congestion Window Time Timeouts may still occur Slowstart to pace packets Fast Retransmit and Recovery Initial Slowstart Lecture 9: 09-25-2002

TCP congestion control TCP modern loss recovery TCP modeling Overview TCP congestion control TCP modern loss recovery TCP modeling Lecture 9: 09-25-2002

TCP Flavors Tahoe, Reno, Vegas TCP Tahoe (distributed with 4.3BSD Unix) Original implementation of Van Jacobson’s mechanisms (VJ paper) Includes: Slow start Congestion avoidance Fast retransmit Lecture 9: 09-25-2002

Fast Retransmit What are duplicate acks (dupacks)? Repeated acks for the same sequence When can duplicate acks occur? Loss Packet re-ordering Window update – advertisement of new flow control window Assume re-ordering is infrequent and not of large magnitude Use receipt of 3 or more duplicate acks as indication of loss Don’t wait for timeout to retransmit packet Lecture 9: 09-25-2002

Fast Retransmit X Retransmission Duplicate Acks Sequence No Packets Time Lecture 9: 09-25-2002

Multiple Losses X X X X Now what? Retransmission Duplicate Acks Sequence No Packets Acks Time Lecture 9: 09-25-2002

Tahoe X X X X Sequence No Packets Acks Time Lecture 9: 09-25-2002

TCP Reno (1990) All mechanisms in Tahoe Addition of fast-recovery Opening up congestion window after fast retransmit Delayed acks Header prediction Implementation designed to improve performance Has common case code inlined With multiple losses, Reno typically timeouts because it does not see duplicate acknowledgements Lecture 9: 09-25-2002

Reno X X X X Now what? - timeout Sequence No Packets Acks Time Lecture 9: 09-25-2002

NewReno The ack that arrives after retransmission (partial ack) could indicate that a second loss occurred When does NewReno timeout? When there are fewer than three dupacks for first loss When partial ack is lost How fast does it recover losses? One per RTT Lecture 9: 09-25-2002

NewReno X X X X Now what? – partial ack recovery Sequence No Packets Acks Time Lecture 9: 09-25-2002

SACK Basic problem is that cumulative acks provide little information Ack for just the packet received What if acks are lost?  carry cumulative also Not used Bitmask of packets received Selective acknowledgement (SACK) How to deal with reordering Lecture 9: 09-25-2002

SACK X X X X Now what? – send retransmissions as soon as detected Sequence No Packets Acks Time Lecture 9: 09-25-2002

Performance Issues Timeout >> fast rexmit Need 3 dupacks/sacks Not great for small transfers Don’t have 3 packets outstanding What are real loss patterns like? How to deal with reordering? Lecture 9: 09-25-2002

How to Change Window When a loss occurs have W packets outstanding New cwnd = 0.5 * cwnd How to get to new state? Lecture 9: 09-25-2002

Fast Recovery Each duplicate ack notifies sender that single packet has cleared network When < cwnd packets are outstanding Allow new packets out with each new duplicate acknowledgement Behavior Sender is idle for some time – waiting for ½ cwnd worth of dupacks Transmits at original rate after wait Ack clocking rate is same as before loss Lecture 9: 09-25-2002

Sent for each dupack after Fast Recovery Sent for each dupack after W/2 dupacks arrive Sequence No X Packets Acks Time Lecture 9: 09-25-2002

TCP congestion control TCP modern loss recovery TCP modeling Overview TCP congestion control TCP modern loss recovery TCP modeling Lecture 9: 09-25-2002

TCP Modeling Given the congestion behavior of TCP can we predict what type of performance we should get? What are the important factors Loss rate Affects how often window is reduced RTT Affects increase rate and relates BW to window RTO Affects performance during loss recovery MSS Affects increase rate Lecture 9: 09-25-2002

Packets transferred = area under curve Overall TCP Behavior Let’s concentrate on steady state behavior with no timeouts and perfect loss recovery Packets transferred = area under curve Window Time Lecture 9: 09-25-2002

Transmission Rate What is area under curve? What was bandwidth? W A = avg window * time = ¾ W * T What was bandwidth? BW = A / T = ¾ W In packets per RTT Need to convert to bytes per second BW = ¾ W * MSS / RTT What is W? Depends on loss rate W W/2 Time Lecture 9: 09-25-2002

Simple TCP Model Some additional assumptions Fixed RTT No delayed ACKs In steady state, TCP losses packet each time window reaches W packets Window drops to W/2 packets Each RTT window increases by 1 packetW/2 * RTT before next loss Lecture 9: 09-25-2002

Simple Loss Model What was the loss rate? BW = ¾ * W * MSS / RTT Packets transferred = (¾ W/RTT) * (W/2 * RTT) = 3W2/8 1 packet lost  loss rate = p = 8/3W2 BW = ¾ * W * MSS / RTT Lecture 9: 09-25-2002

TCP Friendliness What does it mean to be TCP friendly? TCP is not going away Any new congestion control must compete with TCP flows Should not clobber TCP flows and grab bulk of link Should also be able to hold its own, i.e. grab its fair share, or it will never become popular How is this quantified/shown? Has evolved into evaluating loss/throughput behavior If it shows 1/sqrt(p) behavior it is ok But is this really true? Lecture 9: 09-25-2002

Next Lecture Workload changes TCP & routers TCP options