CS 557 Congestion Avoidance

Similar documents
Transport Layer and Data Center TCP

First Midterm for ECE374 03/09/12 Solution!!

Transport Layer Protocols

TCP in Wireless Mobile Networks

Final for ECE374 05/06/13 Solution!!

Computer Networks - CS132/EECS148 - Spring

First Midterm for ECE374 03/24/11 Solution!!

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Computer Networks. Chapter 5 Transport Protocols

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

15-441: Computer Networks Homework 2 Solution

Chapter 6 Congestion Control and Resource Allocation

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

This sequence diagram was generated with EventStudio System Designer (

Visualizations and Correlations in Troubleshooting

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

TCP Adaptation for MPI on Long-and-Fat Networks

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

La couche transport dans l'internet (la suite TCP/IP)

Data Networks Summer 2007 Homework #3

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Mobile Communications Chapter 9: Mobile Transport Layer

2 TCP-like Design. Answer

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Low-rate TCP-targeted Denial of Service Attack Defense

Computer Networks UDP and TCP

TCP over Wireless Networks

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

CS268 Exam Solutions. 1) End-to-End (20 pts)

Networking part 3: the transport layer

Chapter 5. Transport layer protocols

First Midterm for ECE374 02/25/15 Solution!!

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

TCP for Wireless Networks

Higher Layer Protocols: UDP, TCP, ATM, MPLS

Congestions and Control Mechanisms n Wired and Wireless Networks

High Speed Internet Access Using Satellite-Based DVB Networks

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

La couche transport dans l'internet (la suite TCP/IP)

Advanced Computer Networks Project 2: File Transfer Application

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Answer: that dprop equals dtrans. seconds. a) d prop. b) d trans

Digital Audio and Video Data

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

Computer Networks. Data Link Layer

TCP in Wireless Networks

TCP Westwood for Wireless

Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements

A Survey: High Speed TCP Variants in Wireless Networks

Improved Digital Media Delivery with Telestream HyperLaunch

Access Control: Firewalls (1)

A Study on TCP Performance over Mobile Ad Hoc Networks

[Prof. Rupesh G Vaishnav] Page 1

IP - The Internet Protocol

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM

CS551 End-to-End Internet Packet Dynamics [Paxson99b]

High-Speed TCP Performance Characterization under Various Operating Systems

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

D. SamKnows Methodology 20 Each deployed Whitebox performs the following tests: Primary measure(s)

Pig Laboratory. Additional documentation for the laboratory. Exercises and Rules. Tstat Data

Parallel TCP Data Transfers: A Practical Model and its Application

An enhanced TCP mechanism Fast-TCP in IP networks with wireless links

TFTP TRIVIAL FILE TRANSFER PROTOCOL OVERVIEW OF TFTP, A VERY SIMPLE FILE TRANSFER PROTOCOL FOR SIMPLE AND CONSTRAINED DEVICES

Key Components of WAN Optimization Controller Functionality

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Per-Flow Queuing Allot's Approach to Bandwidth Management

Mobile Computing/ Mobile Networks

TCP, Active Queue Management and QoS

Improving Effective WAN Throughput for Large Data Flows By Peter Sevcik and Rebecca Wetzel November 2008

How do I get to

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Sources: Chapter 6 from. Computer Networking: A Top-Down Approach Featuring the Internet, by Kurose and Ross

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

Analytic Models for the Latency and Steady-State Throughput of TCP Tahoe, Reno and SACK

The Problem with TCP. Overcoming TCP s Drawbacks

Congestion Control Review Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?

Architecture and Performance of the Internet

The Effect of Packet Reordering in a Backbone Link on Application Throughput Michael Laor and Lior Gendel, Cisco Systems, Inc.

SELECTIVE-TCP FOR WIRED/WIRELESS NETWORKS

Solving complex performance problems in TCP/IP and SNA environments.

SJBIT, Bangalore, KARNATAKA

TCP/IP Over Lossy Links - TCP SACK without Congestion Control

Network Applications

Based on Computer Networking, 4 th Edition by Kurose and Ross

Master Course Computer Networks IN2097

A Transport Protocol for Multimedia Wireless Sensor Networks

THE UNIVERSITY OF AUCKLAND

Application Note. Windows 2000/XP TCP Tuning for High Bandwidth Networks. mguard smart mguard PCI mguard blade

Giving life to today s media distribution services

File Transfer Protocol (FTP) Throughput Testing by Rachel Weiss

Transcription:

CS 557 Congestion Avoidance Congestion Avoidance and Control Jacobson and Karels, 1988 Spring 2013

The Story So Far. Transport layer: End to End communication, Multiplexing, Reliability, Congestion control, Flow control, Data Layer: richly connected network (many paths) with many types of unreliable links Some Essential Apps: DNS (naming) and NTP (time). Network layer: Addressing, Fragmentation, Dynamic Routing, Best Effort Forwarding

Objective: Main Points Techniques for dealing with network congestion Approach: Slow Start Adaptive Timers. Additive Increase/multiplicitive decrease Contributions: Essential points of TCP congestion control

Motivation and Context Network Collapsing Due to Congestion Throughput drops from 32 Kbps to 40 bps One conclusion, packet switching failed This paper says we can fix the problem Conservation of Packets Can t have collapse if packets entering network = packets leaving network Can we achieve conservation of packets?

TCP Review RFCs: 793, 1122, 1323, 2018, 2581 socket door point-to-point: one sender, one receiver reliable, in-order byte steam: no message boundaries pipelined: TCP congestion and flow control set window size send & receive buffers application writes data TCP send buffer segment application reads data TCP receive buffer socket door full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) init s sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver

TCP Flow Control (1/2) receive side of TCP connection has a receive buffer: flow control sender won t overflow receiver s buffer by transmitting too much, too fast app process may be slow at reading from buffer speed-matching service: matching the send rate to the receiving app s drain rate

TCP Flow control (2/2) (Suppose TCP receiver discards out-of-order segments) spare room in buffer = RcvWindow = RcvBuffer-[LastByteRcvd - LastByteRead] Rcvr advertises spare room by including value of RcvWindow in segments Sender limits unacked data to RcvWindow guarantees receive buffer doesn t overflow

TCP seq. # s and ACKs Seq. # s: byte stream number of first byte in segment s data ACKs: seq # of next byte expected from other side cumulative ACK Q: how receiver handles out-of-order segments TCP spec doesn t say, - up to implementation User types C host ACKs receipt of echoed C Host A Host B Seq=42, ACK=79, data = C Seq=79, ACK=43, data = C Seq=43, ACK=80 simple telnet scenario host ACKs receipt of C, echoes back C time

Challenges to Conservation Connection never reaches equilibrium Too many initial packets drives network into congestion and then hard to recover. Sender adds packets before one leaves Poor timer causes retransmission of packets that are still in-flight on the network. Equilibrium can t be reached due to resource limits on path Assume packet loss is due to congestion and back off by multiplicative factor

Slow Start TCP is Self-Clocking Receipt of ack triggers new packet Good if Network is in Stable State: How to ramp up at the start? Start slow - 1 packet Each ack triggers two packets Quickly Ramp Up Window to Correct Size

TCP: retransmission scenarios Host A Host B Host A Host B Seq=92, 8 bytes data timeout SendBase = 100 time Seq=92, 8 bytes data X loss ACK=100 Seq=92, 8 bytes data ACK=100 lost ACK scenario Sendbase = 100 SendBase = 120 SendBase = 120 Seq=92 timeout Seq=92 timeout time Seq=100, 20 bytes data Seq=92, 8 bytes data premature timeout

TCP retransmission scenarios Host A Host B Seq=92, 8 bytes data timeout Seq=100, 20 bytes data X loss ACK=100 SendBase = 120 ACK=120 time Cumulative ACK scenario

TCP Timeout Values Q: how to set TCP timeout value? longer than RTT but RTT varies too short: premature timeout unnecessary retransmissions too long: slow reaction to segment loss Q: how to estimate RTT? SampleRTT: measured time from segment transmission until ACK receipt ignore retransmissions SampleRTT will vary, want estimated RTT smoother average several recent measurements, not just current SampleRTT

TCP Round Trip Time (RTT) EstimatedRTT = (1- α)*estimatedrtt + α*samplertt Exponential weighted moving average influence of past sample decreases exponentially fast typical value: α = 0.125

Example RTT estimation: RTT: gaia.cs.umass.edu to fantasia.eurecom.fr 350 300 RTT (milliseconds) 250 200 150 100 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 time (seconnds) SampleRTT Estimated RTT

TCP Round Trip Time and Setting the timeout Timeout EstimtedRTT plus safety margin large variation in EstimatedRTT -> larger safety margin first estimate of how much SampleRTT deviates from EstimatedRTT: DevRTT = (1-β)*DevRTT + β* SampleRTT-EstimatedRTT (typically, β = 0.25) Then set timeout interval: TimeoutInterval = EstimatedRTT + 4*DevRTT

TCP Window Size Over Time 24 Kbytes congestion window 16 Kbytes 8 Kbytes time Long-lived TCP connection

TCP Congestion Control Review When CongWin is below Threshold, sender in slow-start phase, window grows exponentially. When CongWin is above Threshold, sender is in congestion-avoidance phase, window grows linearly. When a triple duplicate ACK occurs, Threshold set to CongWin/2 and CongWin set to Threshold. When timeout occurs, Threshold set to CongWin/2 and CongWin is set to 1 MSS.

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 ACKed Arrival of in-order segment with expected seq #. One other segment has ACK pending Arrival of out-of-order segment higher-than-expect seq. #. Gap detected Arrival of segment that partially or completely fills gap TCP Receiver action Delayed ACK. Wait up to 500ms for next segment. If no next segment, send ACK Immediately send single cumulative ACK, ACKing both in-order segments Immediately send duplicate ACK, indicating seq. # of next expected byte Immediate send ACK, provided that segment startsat lower end of gap

Event State TCP Sender Action Commentary ACK receipt for previously unacked data ACK receipt for previously unacked data Loss event detected by triple duplicate ACK Slow Start (SS) Congestion Avoidance (CA) SS or CA CongWin = CongWin + MSS, If (CongWin > Threshold) set state to Congestion Avoidance CongWin = CongWin+MSS * (MSS/CongWin) Threshold = CongWin/2, CongWin = Threshold, Set state to Congestion Avoidance Timeout SS or CA Threshold = CongWin/2, CongWin = 1 MSS, Set state to Slow Start Duplicate ACK SS or CA Increment duplicate ACK count for segment being acked Resulting in a doubling of CongWin every RTT Additive increase, resulting in increase of CongWin by 1 MSS every RTT Fast recovery, implementing multiplicative decrease. CongWin will not drop below 1 MSS. Enter slow start CongWin and Threshold not changed

Fast Retransmit Time-out period often relatively long: long delay before resending lost packet Detect lost segments via duplicate ACKs. Sender often sends many segments back-to-back If segment is lost, there will likely be many duplicate ACKs. If sender receives 3 ACKs for the same data, it supposes that segment after ACKed data was lost: fast retransmit: resend segment before timer expires

Fast retransmit algorithm: event: ACK received, with ACK field value of y if (y > SendBase) { SendBase = y if (there are currently not-yet-acknowledged segments) start timer } else { increment count of dup ACKs received for y if (count of dup ACKs received for y = 3) { resend segment with sequence number y } a duplicate ACK for already ACKed segment fast retransmit

TCP Fairness Fairness goal: if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K TCP connection 1 TCP connection 2 bottleneck router capacity R

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

TCP Throughput What s the average throughout ot TCP as a function of window size and RTT? Ignore slow start Let W be the window size when loss occurs. When window is W, throughput is W/RTT Just after loss, window drops to W/2, throughput to W/2RTT. Average throughout:.75 W/RTT

Window Size and Loss Rate 10 Gbps throughput required window size W = 83,333 in-flight segments TCP assumes every loss is due to congestion Generally safe assumption for reasonable window size. Throughput in terms of loss rate: 1.22 MSS RTT L L = 2 10-10 Wow New versions of TCP for high-speed needed!

Fairness (more) Fairness and UDP Multimedia apps often do not use TCP do not want rate throttled by congestion control Instead use UDP: pump audio/video at constant rate, tolerate packet loss Research area: TCP friendly unreliable transport Fairness and parallel TCP connections nothing prevents app from opening parallel connections between 2 hosts. Web browsers do this Example: link of rate R supporting 9 cnctions; new app asks for 1 TCP, gets rate R/10 new app asks for 11 TCPs, gets R/ 2!

TCP Delay Modeling Q: How long does it take to receive an object from a Web server after sending a request? Ignoring congestion, delay is influenced by: TCP connection establishment data transmission delay slow start Window size: First assume: fixed congestion window Then dynamic window, modeling slow start

Calculating TCP Delay Simple case: Client requests a web page for server Assume no congestion and fixed window size Define the following O = object size (bits) W = window Size S = MSS (Max Segment Size) Assume always send segment of size S R = Bandwitdh RTT = Round Trip Time ACKs and HTTP Request is very very small. What is the best case scenario??

Delay Modeling Q: How long does it take to receive an object from a Web server after sending a request? Ignoring congestion, delay is influenced by: TCP connection establishment data transmission delay slow start Window size: First assume: fixed congestion window Then dynamic window, modeling slow start

Calculating TCP Delay Simple case: Client requests a web page for server Assume no congestion and fixed window size Define the following O = object size (bits) W = window Size S = MSS (Max Segment Size) Assume always send segment of size S R = Bandwitdh RTT = Round Trip Time = 2 * prop delay ACKs and HTTP Request is very very small. What is the best case scenario??

Fixed congestion window (1) Best case: WS/R > RTT + S/R: ACK for first segment in window returns before window s worth of data sent delay = 2RTT + O/R

Fixed congestion window (2) Empty Pipe case: WS/R < RTT + S/R: wait for ACK after sending window s worth of data sent K = number of windows before done delay = 2RTT + O/R + (K-1)[S/R + RTT - WS/R]

TCP Delay Modeling: Slow Start (1) Now suppose window grows according to slow start The delay is : Delay = 2RTT + O R + P " RTT + S % # $ R& ' (2P 1) S R where P is the number of times TCP idles at server: P = min{ Q, K 1} - where Q is the number of times the server idles if the object were of infinite size. - and K is the number of windows that cover the object.

TCP Delay Modeling: Slow Start (2) Delay components: 2 RTT for connection estab and request O/R to transmit object time server idles due to slow start initiate TCP connection request object RTT first window = S/R second window = 2S/R Server idles: P = min{k-1,q} times third window = 4S/R Example: O/S = 15 segments K = 4 windows Q = 2 P = min{k-1,q} = 2 Server idles P=2 times object delivered time at client time at server fourth window = 8S/R complete transmission

TCP Delay Modeling (3) S R + RTT = send data to receive ack 2 k 1 S R = transmit kth window # S R + RTT S& $ % 2k 1 R' ( + = kth window idle initiate TCP connection request object RTT first window = S/R second window = 2S/R third window = 4S/R delay= O + 2RTT + R P p= 1 idletime p fourth window = 8S/R = = O + 2RTT + R O + 2RTT + P[ RTT + R P k= 1 S [ + RTT 2 R S ] (2 R k 1 P S ] R 1) S R object delivered time at client time at server complete transmission

TCP Delay Modeling (4)!! " # # $ + = + = = + + + = + + + = 1) log ( 1)} log ( : min{ } 1 : 2 min{ } / 2 2 : 2 min{ } 2 2 : 2 min{ 2 2 1 1 0 1 1 0 S O S O k k S O k S O k O S S S k K k k k L L Calculation of Q, number of idles for infinite-size object, is similar (see HW). Recall K = number of windows that cover object How do we calculate K?

TCP Evolution Continues Consider the impact of high speed links: 1500 byte segments, 100ms RTT 10 Gbps throughput What is the required window size? Throughput =.75 W/RTT (probably a good formula to remember) Requires window size W = 83,333 in-flight segments

Summary Essential Components of TCP Slow Start AI/MD Timer Estimates