Transport: TCP Manpreet Singh (Slides borrowed from various sources on the web)

Slides:



Advertisements
Similar presentations
TCP Variants.
Advertisements

Simulation-based Comparison of Tahoe, Reno, and SACK TCP Kevin Fall & Sally Floyd Presented: Heather Heiman September 10, 2002.
TCP Vegas: New Techniques for Congestion Detection and Control.
Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
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.
EE 122: Congestion Control The Sequel October 1, 2003.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Chapter 3 Transport Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 12.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
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.
1 Lecture 9: TCP and Congestion Control Slides adapted from: Congestion slides for Computer Networks: A Systems Approach (Peterson and Davis) Chapter 3.
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.
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.
Data Communication and Networks
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 Congestion Control
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
1 EE 122: Advanced TCP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
3: Transport Layer3b-1 Principles of Congestion Control Congestion: r informally: “too many sources sending too much data too fast for network to handle”
Transport Layer 4 2: Transport Layer 4.
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.
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.
Transport Layer3-1 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles.
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
TCP Vegas Kulan Kao 2006/3/25.
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
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.
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:
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.
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.
Transport Layer 3- Midterm score distribution. Transport Layer 3- TCP congestion control: additive increase, multiplicative decrease Approach: increase.
TCP. TCP ACK generation [RFC 1122, RFC 2581] Event at Receiver Arrival of in-order segment with expected seq #. All data up to expected seq # already.
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.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
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.
Other Methods of Dealing with Congestion
CS450 – Introduction to Networking Lecture 19 – Congestion Control (2)
Approaches towards congestion control
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
COMP 431 Internet Services & Protocols
Introduction to Congestion Control
TCP Vegas: New Techniques for Congestion Detection and Avoidance
Chapter 3 outline 3.1 Transport-layer services
TCP Westwood(+) Protocol Implementation in ns-3
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
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
Other Methods of Dealing with Congestion
Chapter 6 TCP Congestion Control
CS640: Introduction to Computer Networks
EE 122: Lecture 10 (Congestion Control)
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP flow and congestion control
Presentation transcript:

Transport: TCP Manpreet Singh (Slides borrowed from various sources on the web)

Announcements (1/2) Everybody needs to join the class mailing list...else I can't communicate class info. Check the class archives to see if someone else has picked the same lecture or TCP application We have a group of machines you can use for simulation (snoopy, linus, etc.). You need CSUG accounts to access these machines. We’ll dig up more machines for those who want to do kernel hacking.

Announcements (2/2) Need a volunteer to give the "post- modern" E2E lecture 9/9 (in class...). The non-research track students will have to do an initial demo by 11/9. Most of the functionality should be there Allows us to give feed back You time to do performance measurements.

Roadmap Why is TCP fair ? Loss-based congestion schemes Tahoe Reno NewReno Sack Delay-based congestion control (Vegas) Modeling TCP throughput Equation-based congestion control

The Desired Properties of a Congestion Control Scheme Efficiency (high utilization) Optimality (high throughput, utility) Fairness (resource sharing) Distributedness (no central knowledge for scalability) Convergence and stability (fast convergence after disturbance, low oscillation)

TCP Fairness Fairness goal: if N TCP sessions share same bottleneck link, each should get 1/N of link capacity TCP congestion avoidance: AIMD: additive increase, multiplicative decrease increase window by 1 per RTT decrease window by factor of 2 on loss event AIMD TCP connection 1 bottleneck router capacity R TCP connection 2

Why is TCP fair? Two competing sessions: Additive increase gives slope of 1, as throughout increases multiplicative decrease decreases throughput proportionally R R equal bandwidth share Connection 1 throughput Connection 2 throughput congestion avoidance: additive increase loss: decrease window by factor of 2 congestion avoidance: additive increase loss: decrease window by factor of 2

Loss vs Delay as signal ??? TCP oscillation Loss is a binary signal Delay is a multi-bit signal

Simulation-based Comparisons of Tahoe, Reno, and SACK TCP Kevin Fall Sally Floyd

Introduction SACK compared with Tahoe, Reno and New-Reno Simulations designed to highlight performance differences with and without SACK

Comparison Tahoe: Slow start, congestion avoidance and fast retransmit Reno: Tahoe + fast recovery New-Reno: Reno with modified fast recovery SACK: Reno + selective ACKs

TCP Slowstart exponential increase (per RTT) in window size (not so slow!) loss event: timeout (Tahoe TCP) and/or or three duplicate ACKs (Reno TCP) initialize: Congwin = 1 for (each segment ACKed) Congwin++ until (loss event OR CongWin > threshold) Slowstart algorithm (non-linear phase) Host A one segment RTT Host B time two segments four segments

TCP Congestion Avoidance /* slowstart is over */ /* Congwin > threshold */ Until (loss event) { every w segments ACKed: Congwin++ } threshold = Congwin/2 Congwin = 1 perform slowstart Congestion avoidance (linear phase) 1 1: TCP Reno skips slowstart (fast recovery) after three duplicate ACKs

Fast Retransmit Receiving small number of duplicate ACKs (3) signals packet loss Lost packet can be retransmitted before timeout This improves channel utilization

TCP/Reno Congestion Control Initially: cwnd = 1; ssthresh = infinite (64K); For each newly ACKed segment: if (cwnd < ssthresh) /* slow start*/ cwnd = cwnd + 1; else /* congestion avoidance; cwnd increases (approx.) by 1 per RTT */ cwnd += 1/cwnd; Triple-duplicate ACKs: /* multiplicative decrease */ cwnd = ssthresh = cwnd/2; Timeout: ssthresh = cwnd/2; cwnd = 1; (if already timed out, double timeout value; this is called exponential backoff)

TCP/Reno: Big Picture Time cwnd slow start congestion avoidance TD TD: Triple duplicate acknowledgements TO: Timeout TO ssthresh congestion avoidance TD congestion avoidance slow start congestion avoidance TD Tahoe + Fast Recovery

Fast Recovery Observation: Each duplicate ACK indicates some packet has left pipe Old cwnd New cwnd = (old cwnd)/2 Left edge fixed till ACK received Usable window increased by 1 for each duplicate ACK Packet lost

New-Reno extension New-Reno continues with fast recovery if a partial ACK is received Old cwnd New cwnd = (old cwnd)/2 Usable window increased by 1 for each duplicate ACK until ACK for LP is received Packet 1 lostPacket 2 lostLP: Last Packet sent before loss detection

Why use SACK? Without SACK sender has to use one of following retransmission strategies - Retransmit 1 dropped packet / RTT Reno, New-Reno - Retransmit packets that might have been successfully delivered Tahoe

SACK option [RFC2018] Ex: 2 nd segment dropped (each segment has 500 bytes) segackSack1 left Sack1 right lost

SACK Congestion Control (1/2) Conservative extensions to Reno Fast recovery algorithm modified Uses a variable called “pipe” to estimate outstanding data in the flow Rules for changing “pipe” variable + 1 when packet transmitted - 1 when dup ACK received

SACK Congestion Control (2/2) SACK sender tracks successfully sent packets using “scoreboard” structure Missing packets are retransmitted Similar to New-Reno in exiting from fast recovery – exits after all outstanding data at time of loss is ACked

Simulation Model used Three flows are setup from S1 to K1, 2 nd and 3 rd flows are used to change packet drop pattern of 1 st flow

One Packet Loss (1/2) Packet dropped Packet retransmitted Performs slow start

One Packet Loss (2/2) Packet dropped Packet retransmitted Performs fast recovery

Two Packet Loss (1/2) Packets dropped Packets retransmitted Performs slow start

Two Packet Loss (2/2) Packets dropped Packets retransmitted Performs fast recovery

Three Packet Losses (1/3) Packets dropped Packets retransmitted Has to wait for timeout

Three Packet Losses (2/3) Packets dropped Packets retransmitted No need for timeout Retransmits 1 pkt/RTT

Three Packet Losses (3/3) Packets dropped Packets retransmitted Retransmits more than 1 pkt /RTT

Observations Tahoe: Robust, performs slow start Reno: For > 2 losses, timeout is often needed New-Reno: Can avoid timeouts, but still cannot retransmit > 1 pkt/RTT SACK: Can retransmit > 1 pkt/RTT, thus recovers from losses faster

Conclusions SACK can improve TCP performance SACK can be used in high loss links too (Ex: Wireless) New-Reno demonstrates that certain problems of Reno can be avoided without SACK

Reno vs Vegas (Congestion Avoidance) Reno’s mechanism Characteristics uses the loss of segments as a signal reactive not proactive needs to create losses to find the available bandwidth example Threshold window congestion window send window

TCP Vegas Idea: source watches for some sign that router’s queue is building up and congestion will happen too; e.g., RTT grows sending rate flattens Congestion window Avg. source send rate Buffer space at router In shaded region we expect throughput to increase but it cannot increase beyond available bandwidth

Vegas’ approach Basic idea Vegas tries not to send at a rate that causes buffers to fill maintain the right amount of extra data based on changes in the estimated amount of extra data window size vs. throughput Keep the actual rate straying too far from the available rate (resulting in smooth congestion avoidance period)

Vegas Algorithm define a given connection’s BaseRTT BaseRTT = the minimum of all measured RTT expected throughput = WindowSize / BaseRTT Actual rate = Flight size / RTT Calculate the current Actual sending rate Compare Actual (A) to expected (E) and adjusts the window (linear increase or decrease) If (E-A) > beta, cwnd - - (congestion state) If (E-A) < alpha, cwnd++ (low utilization) When a loss is detected, reduce the window by a half

Algorithm (cont) Parameters   = 1 buffer   = 3 buffers Black line = actual rate Green line = expected rate Shaded = region between  and  Note: Linear decrease in Vegas does not violate AIMD since it Happens before packets loss

Comparison of Reno and Vegas (Retransmission) o Reno’s retransmission mechanism retransmission timeout based on RTT and variance estimates BSD-based : 500ms Fast Retransmit and Fast Recovery When the sender receives duplicate acks, it reduces the window size by a half and avoids timeout which causes retransmission with slow start If multiple drops occur, timeout and slow start will follow anyway. 19% increase in throughput

Vegas’ Retransmission reads and records the system clock each time a segment is sent when an ACK arrives, Vegas reads the clock again RTT calculation using this time and the timestamp recorded for the relevant segment uses this more accurate RTT estimate to decide to retransmit

Some fun topics to discuss…

Modeling TCP throughput Consider congestion avoidance only Time cwnd congestion avoidance TD ssthresh Assume one packet loss (loss event) per cycle Total packets send per cycle: 3W 2 /8 Thus p = 1/( 3W 2 /8) = 8/(3W 2 ) => bottleneck bandwidth W/2 W

Modeling TCP throughput… 1/throughput = c * sqrt(p) * RTT

Equation-based Congestion Control Don’t need reliability But still want to be friendly to the network What rate should we send the UDP traffic ? Use detailed TCP analysis to relate throughput to loss and RTT. Measure these values and then calculated appropriate throughput directly. Result is rate-based and equation-driven protocol called TFRC.

mulTCP Effect of AIMD parameters on the throughput of TCP