Lecture 4: Congestion Control

Similar documents
Flow and Congestion Control Marcos Vieira

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

Reliable Transport II: TCP and Congestion Control

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Reliable Transport II: TCP and Congestion Control

Introduc)on to Computer Networks

Lecture 12: TCP Friendliness, DCCP, NATs, and STUN

Lecture 10: TCP Friendliness, DCCP, NATs, and STUN

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

Congestion Control. Lecture 12: TCP Friendliness, DCCP, NATs, and STUN. Chiu Jain Phase Plots. Fair A=B. Responding to Loss. Flow B rate (bps) t 1 t 3

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

Flow and Congestion Control (Hosts)

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

cs/ee 143 Communication Networks

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Congestion Avoidance and Control. Rohan Tabish and Zane Ma

Computer Networking Introduction

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

COMP/ELEC 429/556 Introduction to Computer Networks

Congestion Collapse in the 1980s

Internet Networking recitation #10 TCP New Reno Vs. Reno

Transport Protocols and TCP

image 3.8 KB Figure 1.6: Example Web Page

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Lecture 3: The Transport Layer: UDP and TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

ECE 333: Introduction to Communication Networks Fall 2001

Outline. User Datagram Protocol (UDP) Transmission Control Protocol (TCP) Transport layer (cont.) Transport layer. Background UDP.

CS519: Computer Networks. Lecture 5, Part 4: Mar 29, 2004 Transport: TCP congestion control

Transport Layer (Congestion Control)

TCP Performance. EE 122: Intro to Communication Networks. Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim

TCP: Transmission Control Protocol UDP: User Datagram Protocol TCP - 1

TCP congestion control:

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

CSE 461. TCP and network congestion

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Congestion Control. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

05 Transmission Control Protocol (TCP)

Congestion Control. Brighten Godfrey CS 538 January Based in part on slides by Ion Stoica

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

User Datagram Protocol (UDP):

Networked Systems and Services, Fall 2018 Chapter 3

Networked Systems and Services, Fall 2017 Reliability with TCP

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

Contents. CIS 632 / EEC 687 Mobile Computing. TCP in Fixed Networks. Prof. Chansu Yu

Advanced Computer Networks

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

Congestion Control End Hosts. CSE 561 Lecture 7, Spring David Wetherall. How fast should the sender transmit data?

CS321: Computer Networks Congestion Control in TCP

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

TCP Congestion Control

Transport Layer TCP / UDP

ECE697AA Lecture 3. Today s lecture

Reliable Transport I: Concepts and TCP Protocol

CS3600 SYSTEMS AND NETWORKS

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 30, 2018

Chapter 24. Transport-Layer Protocols

Outline. Internet. Router. Network Model. Internet Protocol (IP) Design Principles

Recap. TCP connection setup/teardown Sliding window, flow control Retransmission timeouts Fairness, max-min fairness AIMD achieves max-min fairness

CS4700/CS5700 Fundamentals of Computer Networks

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Fall 2012: FCM 708 Bridge Foundation I

Transport Protocols & TCP TCP

TCP Congestion Control

TCP Congestion Control

Communication Networks

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

UNIT IV -- TRANSPORT LAYER

CE693 Advanced Computer Networks

Intro to LAN/WAN. Transport Layer

TCP Congestion Control

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

TCP over Wireless PROF. MICHAEL TSAI 2016/6/3

CSE/EE 461. TCP congestion control. Last Lecture. This Lecture. Focus How should senders pace themselves to avoid stressing the network?

Transport Layer Marcos Vieira

Transmission Control Protocol (TCP)

ECE 435 Network Engineering Lecture 10

Computer Networks. Wenzhong Li. Nanjing University

Chapter III: Transport Layer

Answers to Sample Questions on Transport Layer

Outline Computer Networking. Functionality Split. Transport Protocols

EE 122: Transport Protocols. Kevin Lai October 16, 2002

Transport Protocols and TCP: Review

Operating Systems and Networks. Network Lecture 10: Congestion Control. Adrian Perrig Network Security Group ETH Zürich

Where we are in the Course. Topic. Nature of Congestion. Nature of Congestion (3) Nature of Congestion (2) Operating Systems and Networks

Chapter III. congestion situation in Highspeed Networks

CSCI-1680 Transport Layer III Congestion Control Strikes Back Rodrigo Fonseca

Multiple unconnected networks

CNT 6885 Network Review on Transport Layer

Transport Protocols. Raj Jain. Washington University in St. Louis

TCP Basics : Computer Networking. Overview. What s Different From Link Layers? Introduction to TCP. TCP reliability Assigned reading

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

CS Networks and Distributed Systems. Lecture 10: Congestion Control

Transcription:

Lecture 4: Congestion Control

Overview Internet is a network of networks Narrow waist of IP: unreliable, best-effort datagram delivery Packet forwarding: input port to output port Routing protocols: computing port mappings Transport: end-to-end, reliability, flow control, and congestion control

Transport Provides end-to-end communication between applications UDP: unreliable datagram delivery (thin layer on top of IP) TCP: reliable stream delivery

TCP Connection establishment Connection teardown Retransmission timeout (RTT and variance) Flow control (receiver window) Congestion control (transmit window)

TCP Connection establishment Connection teardown Retransmission timeout (RTT and variance) Flow control (receiver window) Congestion control (transmit window)

1974: 3-way handshake A Bit of History 1978: TCP and IP split into TCP/IP 1983: January 1, ARPAnet switches to TCP/IP 1986: Internet begins to suffer congestion collapses 1987-8: Van Jacobson fixes TCP, publishes seminal paper (Tahoe) 1990: Fast recovery and fast retransmit added (Reno)

Three questions Goal: maintain TCP goodput at equilibrium When does TCP retransmit packets? When does TCP transmit packets? When does TCP ack packets?

Flow Control Part of TCP specification (pre-1988) Want to make sure we don t send more than what the receiver can handle Sliding window protocol as described in lectures 2 and 3 Use window header field to tell other side how much space you have Rule: Sent and unacknowledged bytes window

TCP segment 0 1 2 3 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 data offset source port reserved checksum sequence number destination port acknowledgment number U A P R S F R C G KH S T S N Y N I Window options data urgent pointer padding

Before Tahoe Send Timing - On connection, nodes send full window of packets - Retransmit packet immediately after its timer expires Result: window-sized bursts of packets in network

Bursts of packets

Retransmission TCP dynamically estimates round trip time If segment goes unacknowledged, must retransmit Use exponential backoff (in case loss from congestion) After 10 minutes, give up and reset connection

Round Trip Time (RTT) We want to estimate RTT so we can know a packet was likely lost, not just delayed The challenge is that RTTs for individual packets can be highly variable, both on long-term and short-term time scales Can increase significantly with load! Solution - Use exponentially weighted moving average (EWMA) - Estimate deviation as well as expected value - Assume packet is lost when time is well beyond reasonable deviation

RTT with EWMA Est RT T = (1 α) Est RT T + α Sample RT T - Recommended α is 0.125 Dev RT T = (1 β) Dev RT T +β Sample RT T Est RT T - Recommended β is 0.25 Timeout is Est RT T + 4 Dev RT T

Old RTT estimation

Tahoe RTT estimation

Self-Clocking Goal is conservation of packets in steady state - A new packet isn t put into the network until an old one leaves - Very effective in avoiding and controlling congestion Solution: send a data packet for each ack

Self-Clocking, Continued Assuming good RTT estimation, self-clocking prevents congestion by making window limit the number of packets in the network Very simple to implement But how big should the window be?

But how do you start? Slow start Introduce a congestion window to connection state, cwnd Rule: Sent and unacknowledged bytes cwnd On start or loss, set cwnd to one packet (or... more on this later) On each data ack, increase cwnd by one packet Prevents bursts of packets

With Slow Start Slow start allows connection to quickly reach equilibrium How do we maintain it?

Two States TCP has two states: Slow Start (SS) and Congestion Avoidance (CA) A window size threshold governs the state transition - Window threshold: slow start - Window > threshold: collision avoidance States differ in how they respond to new acks - Slow start: cwnd += MSS - Congestion avoidance: cwnd += MSS2 cwnd (MSS every RTT)

Two conflicting goals Congestion Control - Provider: high utilization - User: fairness among users Want to converge to a state where everyone gets 1 N Avoid congestion collapse

Taming Congestion The optimal congestion window is the bandwidth/delay product Sender learns this by adapting window size Senders must slow down when there is congestion Absence of ACKs (timeout) implies serious congestion Duplicate ACKs imply some congestion

Responding to Loss (TCP Tahoe) On triple duplicate ACK or timeout - Implies lost packet - Set threshold to cwnd 2 - Set cwnd to 1 - Enter slow start state

TCP Reno [RFC 2581] Same as Tahoe on timeout On triple duplicate ACK - Set threshold to cwnd 2 - Set cwnd to cwnd 2 (fast recovery) - Retransmit missing segment (fast retransmit) - Stays in congestion avoidance state

TCP NewReno [RFC 3782] Same as Tahoe/Reno on timeout During fast recovery - Keep track of last unacknowledged packet on entering fast recovery - On every duplicate ACK, inflate congestion window by MSS - When last packet is acknowledged, return to congestion avoidance, set cwnd back to original value

Walk Through Three Examples TCP Tahoe (RTT estimation, congestion window) TCP Reno (Fast retransmit, fast recovery) TCP New Reno (cwnd inflation in fast recovery state)

2-minute stretch

AIMD Additive increase, multiplicative decrease Behavior in congestion avoidance mode Why AIMD? Remember goals: - Link utilization - Fairness

AIMD in action AIMD in Action Sender searches for correct window size Figure thanks to Brad Karp 30

Chiu Jain Phase Plots Flow B rate (bps) Flow A rate (bps)

Chiu Jain Phase Plots Fair A=B Flow B rate (bps) Flow A rate (bps)

Chiu Jain Phase Plots Fair A=B Flow B rate (bps) Efficient A+B=C Flow A rate (bps)

Chiu Jain Phase Plots Fair A=B Flow B rate (bps) overload underload Efficient A+B=C Flow A rate (bps)

Chiu Jain Phase Plots Fair A=B Flow B rate (bps) overload underload Efficient A+B=C Flow A rate (bps)

Chiu Jain Phase Plots t 2 Fair A=B Flow B rate (bps) t 1 t 3 t 5 t 4 t 6 overload underload Efficient A+B=C Flow A rate (bps)

Chiu Jain Phase Plots β Fair A=B Flow B rate (bps) α overload underload Efficient A+B=C Flow A rate (bps)

Three questions, revisited Goal: maintain TCP goodput at equilibrium When does TCP retransmit packets? When does TCP transmit packets? When does TCP ack packets?

Sending acknowledgements An ACK must be sent for every other segment (RFC 2581) An ACK must be sent within 500ms (RFC 2581) Send duplicate acks aggressively

Acknowledgement Issues Savage et al., CCR 1999 ACKs are in terms of bytes Congestion control is in terms of segments What if you send multiple ACKs per segment?

Multiplicative increase Receiver can force multiplicative increase, for M segment length Can lead to 4GB cwnd in 4 RTTs!

TCP Daytona!

TCP Daytona Lessons TCP implementations now symmetrically use bytes Protocol specification is difficult! Very subtle and simple design decisions can lead to undesired behavior IETF requires at least two interoperating implementations before moving to standards track Protocols evolve

Future of TCP BitTorrent can lead to other apps performing poorly - BitTorrent (and other P2P applications) can open 10-100 connections - TCP provides per-flow, not per-application, fairness Low Extra Delay Background Transport (ledbat) - LEDBAT is a transport-area WG that will focus on broadly applicable techniques that allow large amounts of data to be consistently transmitted without substantially affecting the delays experienced by other users and applications.

Future of TCP, Continued High speed links/high bandwidth-delay product - Single packet loss cuts cwnd in half - Can take a long time to grow - Fast TCP, High-Speed TCP Wireless - Wireless exhibits many losses due to poor links, limits throughput - High-throughput TCP in wireless meshes does not yet exist - More in lecture 11