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



Similar documents
TCP in Wireless Mobile Networks

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

TCP over Wireless Networks

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

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

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

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

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

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

Data Networks Summer 2007 Homework #3

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN

CSE 123: Computer Networks

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

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

Transport Layer Protocols

Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control

TCP Westwood for Wireless

Transport layer issues in ad hoc wireless networks Dmitrij Lagutin,

Per-Flow Queuing Allot's Approach to Bandwidth Management

TCP for Wireless Networks

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

Congestions and Control Mechanisms n Wired and Wireless Networks

15-441: Computer Networks Homework 2 Solution

Networking part 3: the transport layer

Protagonist International Journal of Management And Technology (PIJMT) Online ISSN Vol 2 No 3 (May-2015) Active Queue Management

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

Chapter 6 Congestion Control and Resource Allocation

TCP, Active Queue Management and QoS

2 TCP-like Design. Answer

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

17: Queue Management. Queuing. Mark Handley

This sequence diagram was generated with EventStudio System Designer (

Final for ECE374 05/06/13 Solution!!

Active Queue Management (AQM) based Internet Congestion Control

Router-assisted congestion control. Lecture 8 CS 653, Fall 2010

SJBIT, Bangalore, KARNATAKA

Effects of Filler Traffic In IP Networks. Adam Feldman April 5, 2001 Master s Project

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

Research of TCP ssthresh Dynamical Adjustment Algorithm Based on Available Bandwidth in Mixed Networks

Visualizations and Correlations in Troubleshooting

Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

Mobile Communications Chapter 9: Mobile Transport Layer

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

Basic Multiplexing models. Computer Networks - Vassilis Tsaoussidis

Experiences with Interactive Video Using TFRC

Low-rate TCP-targeted Denial of Service Attack Defense

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

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

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

TCP Adaptation for MPI on Long-and-Fat Networks

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

TCP PACKET CONTROL FOR WIRELESS NETWORKS

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

A Survey: High Speed TCP Variants in Wireless Networks

Random Early Detection Gateways for Congestion Avoidance

Aspera FASP TM High Speed Transport A Critical Technology Comparison WHITE PAPER

Analysis and Detection of a Denial-of-Service Attack Scenario generated by TCP Receivers to Edge Network

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

Lecture 16: Quality of Service. CSE 123: Computer Networks Stefan Savage

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

HyperIP : VERITAS Replication Application Note

TCP based Denial-of-Service Attacks to Edge Network: Analysis and Detection

An Improved TCP Congestion Control Algorithm for Wireless Networks

Quality of Service Analysis of site to site for IPSec VPNs for realtime multimedia traffic.

TCP in Wireless Networks

Early Binding Updates and Credit-Based Authorization A Status Update

Robust Router Congestion Control Using Acceptance and Departure Rate Measures

CHAPTER 1 ATM TRAFFIC MANAGEMENT

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

The Data Replication Bottleneck: Overcoming Out of Order and Lost Packets across the WAN

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

High-Speed TCP Performance Characterization under Various Operating Systems

Performance Analysis of AQM Schemes in Wired and Wireless Networks based on TCP flow

ECSE-6600: Internet Protocols Exam 2

Analysis of Internet Transport Service Performance with Active Queue Management in a QoS-enabled Network

CSE3214 Computer Network Protocols and Applications. Chapter 1 Examples and Homework Problems

Chaoyang University of Technology, Taiwan, ROC. 2 Department of Computer Science and Information Engineering

TCP Behavior of a Busy Internet Server: Analysis and Improvements

AN IMPROVED SNOOP FOR TCP RENO AND TCP SACK IN WIRED-CUM- WIRELESS NETWORKS

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

Using Fuzzy Logic Control to Provide Intelligent Traffic Management Service for High-Speed Networks ABSTRACT:

Parallel TCP Data Transfers: A Practical Model and its Application

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Challenges of Sending Large Files Over Public Internet

Strategies. Addressing and Routing

Active Queue Management

Performance evaluation of TCP connections in ideal and non-ideal network environments

Stop And Wait. ACK received; transmit frame 2 CS 455 3

Linux TCP Implementation Issues in High-Speed Networks

Computer Networks. Chapter 5 Transport Protocols

Applying Router-Assisted Congestion Control to Wireless Networks: Challenges and Solutions 1

SELECTIVE-TCP FOR WIRED/WIRELESS NETWORKS

THE Internet provides a convenient and cost-effective

A Spectrum of TCP-Friendly Window-Based Congestion Control Algorithms

ALTHOUGH it is one of the first protocols

Network Protocol Design and Evaluation

A Qos SCHEME TO ADDRESS COMMUNICATION LATENCY ISSUES FOR CRITICAL NETWORK FLOWS IN BEST-EFFORT NETWORKS USING MOBILE AGENTS

Requirements of Voice in an IP Internetwork

FEW would argue that one of TCP s strengths lies in its

SIP Server Overload Control: Design and Evaluation

Transcription:

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

Overview Yesterday: TCP & UDP overview Connection setup Flow control: resource exhaustion at end node Today: Congestion control Resource exhaustion within the network 2

Today How fast should a sending host transmit data? Not too fast, not too slow, just right Should not be faster than the receiver can process Flow control (last class) Should not be faster than the sender s share Bandwidth allocation Should not be faster than the network can process Congestion control Congestion control & bandwidth allocation are separate ideas, but frequently combined 3

Resource Allocation Source 1 Source 2 Source 3 100Mbps 10Mbps Router 10Mbps Router 10Mbps Router 4Mbps 6Mbps Destination 1 Destination 2 How much bandwidth should each flow from a source to a destination receive when they compete for resources? What is a fair allocation? 4

Statistical Multiplexing 1. The bigger the buffer, the lower the packet loss. 2. If the buffer never goes empty, the outgoing line is busy 100% of the time. 5

Congestion Router 1.5-Mbps T1 link Destination Source 2 Packets dropped here Buffer intended to absorb bursts when input rate > output But if sending rate is persistently > drain rate, queue builds Dropped packets represent wasted work; goodput < throughput (goodput = useful throughput) 6

Drop-Tail Queuing Congestive packet loss Goodput Latency Congestion collapse Network Load 7

Congestion Collapse Rough definition: When an increase in network load produces a decrease in useful work Why does it happen? Sender sends faster than bottleneck link speed» Whats a bottleneck link? Packets queue until dropped In response to packets being dropped, sender retransmits» Retransmissions further congest link All hosts repeat in steady state 8

Mitigation Options Increase network resources More buffers for queuing Increase link speed Pros/Cons of these approaches? Reduce network load Send data more slowly How much more slowly? When to slow down? 9

Designing a Control Open loop Explicitly reserve bandwidth in the network in advance of sending (next class, a bit) Closed loop Respond to feedback and adjust bandwidth allocation Network-based Network implements and enforces bandwidth allocation (next class) Host-based Hosts are responsible for controlling their sending rate to be no more than their share What is typically used on the Internet? Why? 10

Proactive vs. Reactive Congestion avoidance: try to stay to the left of the knee Congestion control: try to stay to the left of the cliff Knee Cliff Congestive packet loss Throughput Latency Congestion collapse Network Load 11

Challenges to Address How to detect congestion? How to limit sending data rate? How fast to send? 12

Detecting Congestion Explicit congestion signaling Source Quench: ICMP message from router to host» Problems? DECBit / Explicit Congestion Notification (ECN):» Router marks packet based on queue occupancy (i.e. indication that packet encountered congestion along the way)» Receiver tells sender if queues are getting too full (typically in ACK) Implicit congestion signaling Packet loss» Assume congestion is primary source of packet loss» Lost packets (timeout, NAK) indicate congestion Packet delay» Round-trip time increases as packets queue» Packet inter-arrival time is a function of bottleneck link 13

Throttling Options Window-based (TCP) Artificially constrain number of outstanding packets allowed in network Increase window to send faster; decrease to send slower Pro: Cheap to implement, good failure properties Con: Creates traffic bursts (requires bigger buffers) Rate-based (many streaming media protocols) Two parameters (period, packets) Allow sending of x packets in period y Pro: smooth traffic Con: fine-grained per-connection timers, what if receiver fails? 14

Choosing a Send Rate Ideally: Keep equilibrium at knee of power curve Find knee somehow Keep number of packets in flight the same» E.g., don t send a new packet into the network until you know one has left (i.e. by receiving an ACK) What if you guess wrong, or if bandwidth availability changes? Compromise: adaptive approximation If congestion signaled, reduce sending rate by x If data delivered successfully, increase sending rate by y How to relate x and y? Most choices don t converge 15

TCP s Probing Approach 100 Mbps Ethernet Router 45 Mbps T3 link Sink Each source independently probes the network to determine how much bandwidth is available Changes over time, since everyone does this Assume that packet loss implies congestion Since errors are rare; also, requires no support from routers 16

Basic TCP Algorithm Window-based congestion control Allows congestion control and flow control mechanisms to be unified rwin: advertised flow control window from receiver cwnd: congestion control window estimated at sender» Estimate of how much outstanding data network can deliver in a round-trip time Sender can only send MIN(rwin,cwnd) at any time Idea: decrease cwnd when congestion is encountered; increase cwnd otherwise Question: how much to adjust? 17

Congestion Avoidance Goal: Adapt to changes in available bandwidth Additive increase, Multiplicative Decrease (AIMD) Increase sending rate by a constant (e.g. by 1500 bytes) Decrease sending rate by a linear factor (e.g. divide by 2) Rough intuition for why this works Let L i be queue length at time i In steady state: L i = N, where N is a constant During congestion, L i = N + yl i-1, where y > 0 Consequence: queue size increases multiplicatively» Must reduce sending rate multiplicatively as well 18

AIMD Increase slowly while we believe there is bandwidth Additive increase per RTT Cwnd += 1 full packet / RTT Source Destination Decrease quickly when there is loss (went too far!) Multiplicative decrease Cwnd /= 2 19

TCP Congestion Control Only W packets may be outstanding Rule for adjusting congestion window (W) If an ACK is received: W W+1/W If a packet is lost: W W/2 20

Slow Start Goal: quickly find the equilibrium sending rate Quickly increase sending rate until congestion detected Remember last rate that worked and don t overshoot it Algorithm: On new connection, or after timeout, set cwnd=1 full pkt For each segment acknowledged, increment cwnd by 1 pkt If timeout then divide cwnd by 2, and set ssthresh = cwnd If cwnd >= ssthresh then exit slow start Why called slow? Its exponential after all 21

Slow Start Example Sender cwnd=1 cwnd=2 cwnd=4 Receiver cwnd 300 250 200 150 100 50 cwnd=8 0 0 1 2 3 4 5 6 7 8 round-trip times 22

Basic Mechanisms 18 16 Slow Start + Congestion Avoidance Timeout cwnd 14 12 10 8 6 4 2 0 ssthresh Slow start Congestion avoidance 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 round-trip times 23

Fast Retransmit & Recovery Fast retransmit Timeouts are slow (1 second is fastest timeout on many TCPs) When packet is lost, receiver still ACKs last in-order packet Use 3 duplicate ACKs to indicate a loss; detect losses quickly» Why 3? When wouldn t this work? Fast recovery Goal: avoid stalling after loss If there are still ACKs coming in, then no need for slow start If a packet has made it through -> we can send another one Divide cwnd by 2 after fast retransmit Increment cwnd by 1 full pkt for each additional duplicate ACK 24

Fast Retransmit Example Sender Receiver 3 Dup Acks Fast recovery (increase cwnd by 1) Fast retransmit 25

More Sophistication 18 16 Slow Start + Congestion Avoidance + Fast Retransmit + Fast Recovery 14 12 cwnd 10 8 6 4 2 Fast recovery 0 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 round-trip times 26

Delayed ACKs In request/response programs, want to combine an ACK to a request with a response in the same packet Delayed ACK algorithm:» Wait 200ms before ACKing» Must ACK every other packet (or packet burst) Impact on slow start? Must not delay duplicate ACKs Why? What is the interaction with the congestion control algorithms? 27

Short Connections Short connection: only contains a handful of pkts How do short connections and Slow-Start interact? What happens when a packet is lost during Slow-Start? Will short connections be able to use full bandwidth? Do you think most flows are short or long? Do you think most traffic is in short flows or long flows? 28

Open Issues TCP is designed around the premise of cooperation What happens to TCP if it competes with a UDP flow? What if we divide cwnd by 3 instead of 2 after a loss? There are a bunch of magic numbers Decrease by 2x, increase by 1/cwnd, 3 duplicate acks, initial timeout = 3 seconds, etc But overall it works quite well! 29

Summary TCP actively probes the network for bandwidth, assuming that a packet loss signals congestion The congestion window is managed with an additive increase/multiplicative decrease policy It took fast retransmit and fast recovery to get there Slow start is used to avoid lengthy initial delays Ramp up to near target rate, then switch to AIMD Fast recovery is used to keep network full while recovering from a loss 30

For next time Last class: Resource management in the network (i.e., Quality of Service) P&D 6.1-6.2, 6.5.1 31