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

Similar documents
Transport Layer (Congestion Control)

Congestion Collapse in the 1980s

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

Opera&ng Systems and Networks. Network Lecture 10: Conges&on Control. Adrian Perrig Network Security Group ETH Zürich

Computer Networks (Honor Track)

Computer Networks. Course Reference Model. Topic. Congestion What s the hold up? Nature of Congestion. Nature of Congestion 1/5/2015.

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

Transport Layer (TCP/UDP)

Transport Layer (TCP/UDP)

Transport Layer (TCP/UDP)

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

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CS321: Computer Networks Congestion Control in TCP

image 3.8 KB Figure 1.6: Example Web Page

CSE 123A Computer Networks

Transport Layer (Congestion Control)

Flow and Congestion Control (Hosts)

Lecture 21: Congestion Control" CSE 123: Computer Networks Alex C. Snoeren

cs/ee 143 Communication Networks

MPTCP: Design and Deployment. Day 11

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

Bandwidth Allocation & TCP

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

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

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

TCP Congestion Control

TCP Congestion Control

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

Flow and Congestion Control Marcos Vieira

Lecture 14: Congestion Control"

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

6.033 Spring 2015 Lecture #11: Transport Layer Congestion Control Hari Balakrishnan Scribed by Qian Long

CS3600 SYSTEMS AND NETWORKS

Internet Networking recitation #10 TCP New Reno Vs. Reno

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

CSE 461. TCP and network congestion

TCP over Wireless. Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land 1

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

CS4700/CS5700 Fundamentals of Computer Networks

COMP/ELEC 429/556 Introduction to Computer Networks

Reliable Transport II: TCP and Congestion Control

CS Networks and Distributed Systems. Lecture 10: Congestion Control

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

Context. TCP is the dominant transport protocol in today s Internet. Embodies some of Internet design principles

Congestion / Flow Control in TCP

Computer Networking Introduction

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

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

TCP congestion control:

Recap. More TCP. Congestion avoidance. TCP timers. TCP lifeline. Application Presentation Session Transport Network Data Link Physical

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

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

The Transport Layer Congestion control in TCP

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

Lecture 4: Congestion Control

TCP Congestion Control. Lecture 16. Outline. TCP Congestion Control. Additive Increase / Multiplicative Decrease (AIMD)

ADVANCED COMPUTER NETWORKS

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

Performance Analysis of TCP Variants

Chapter III: Transport Layer

Advanced Congestion Control (Hosts)

Networked Systems and Services, Fall 2018 Chapter 3

Congestion control in TCP

Outline. CS5984 Mobile Computing

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

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

Multiple unconnected networks

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

UNIT IV -- TRANSPORT LAYER

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

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

Networked Systems and Services, Fall 2017 Reliability with TCP

Advanced Computer Networks

CS 356: Computer Network Architectures Lecture 19: Congestion Avoidance Chap. 6.4 and related papers. Xiaowei Yang

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

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

TCP based Receiver Assistant Congestion Control

Reliable Transport II: TCP and Congestion Control

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2017

CS268: Beyond TCP Congestion Control

Communication Networks

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

TCP Congestion Control

CS Transport. Outline. Window Flow Control. Window Flow Control

TCP OVER AD HOC NETWORK

Advanced Computer Networks

Programmation Réseau et Système

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

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

8. TCP Congestion Control

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

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

Fall 2012: FCM 708 Bridge Foundation I

TCP Congestion Control 65KB W

15-744: Computer Networking TCP

Congestion Control. Queuing Discipline Reacting to Congestion Avoiding Congestion. Issues

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

Transcription:

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

Feedback Signals Several possible signals, with different pros/cons We ll look at classic TCP that uses packet loss as a signal Signal Example Protocol Pros / Cons Packet loss Packet delay Router indication TCP NewReno Cubic TCP (Linux) Compound TCP (Windows) TCPs with Explicit Congestion Notification Hard to get wrong Hear about congestion late Hear about congestion early Need to infer congestion Hear about congestion early Require router support 82

TCP Tahoe/Reno Avoid congestion collapse without changing routers (or even receivers) Idea is to fix timeouts and introduce a congestion window (cwnd) over the sliding window to limit queues/loss TCP Tahoe/Reno implements AIMD by adapting cwnd using packet loss as the network feedback signal

TCP Tahoe/Reno (2) TCP behaviors we will study: ACK clocking Adaptive timeout (mean and variance) Slow-start Fast Retransmission Fast Recovery Together, they implement AIMD 84

Sliding Window ACK Clock Each in-order ACK advances the sliding window and lets a new segment enter the network ACKs clock data segments 20 19 18 17 16 15 14 13 12 11 Data Ack 1 2 3 4 5 6 7 8 9 10

Benefit of ACK Clocking Consider what happens when sender injects a burst of segments into the network Queue Fast link Slow (bottleneck) link Fast link 86

Benefit of ACK Clocking (2) Segments are buffered and spread out on slow link Segments spread out Fast link Slow (bottleneck) link Fast link 87

Benefit of ACK Clocking (3) ACKs maintain the spread back to the original sender Slow link Acks maintain spread 88

Benefit of ACK Clocking (4) Sender clocks new segments with the spread Now sending at the bottleneck link without queuing! Segments spread Queue no longer builds Slow link 89

Benefit of ACK Clocking (4) Helps the network run with low levels of loss and delay! The network has smoothed out the burst of data segments ACK clock transfers this smooth timing back to the sender Subsequent data segments are not sent in bursts so do not queue up in the network

TCP Startup Problem We want to quickly near the right rate, cwnd IDEAL, but it varies greatly Fixed sliding window doesn t adapt and is rough on the network (loss!) AI with small bursts adapts cwnd gently to the network, but might take a long time to become efficient 91

Slow-Start Solution Start by doubling cwnd every RTT Exponential growth (1, 2, 4, 8, 16, ) Start slow, quickly reach large values Window (cwnd) Fixed Slow-start AI Time 92

Slow-Start Solution (2) Eventually packet loss will occur when the network is congested Loss timeout tells us cwnd is too large Next time, switch to AI beforehand Slowly adapt cwnd near right value 93

Question: what is the cwnd at which packet loss will happen during slow start? Extent of subtitles 94

Slow-Start Solution (3) Combined behavior, after first time Most time spent near right value Window cwnd C cwnd IDEAL ssthresh Fixed Slow-start AI phase AI Time 95

Slow-Start (Doubling) Timeline Increment cwnd by 1 packet for each ACK 96

Additive Increase Timeline Increment cwnd by 1 packet every cwnd ACKs (or 1 RTT) 97

TCP Tahoe (Implementation) Initial slow-start (doubling) phase Start with cwnd = 1 (or small value) cwnd += 1 packet per ACK Later Additive Increase phase cwnd += 1/cwnd packets per ACK Roughly adds 1 packet per RTT Switching threshold (initially infinity) Switch to AI when cwnd > ssthresh Set ssthresh = cwnd/2 after loss Begin with slow-start after timeout 98

How can we improve on TCP Tahoe? Extent of subtitles 99

Timeout Misfortunes Why do a slow-start after timeout? Instead of MD cwnd (for AIMD) Timeouts are sufficiently long that the ACK clock will have run down Slow-start ramps up the ACK clock We need to detect loss before a timeout to get to full AIMD Done in TCP Reno 100

Inferring Loss from ACKs TCP uses a cumulative ACK Carries highest in-order seq. number Normally a steady advance Duplicate ACKs give us hints about what data hasn t arrived Tell us some new data did arrive, but it was not next segment Thus the next segment may be lost 101

Fast Retransmit Treat three duplicate ACKs as a loss Retransmit next expected segment Some repetition allows for reordering, but still detects loss quickly Ack 1 2 3 4 5 5 5 5 5 5 102

Fast Retransmit (2)...... Third duplicate ACK, so send 14 ACK jumps after loss is repaired Ack 10 Ack 11 Ack 12 Ack 13 Ack 13 Ack 13 Ack 13 Ack 13... Ack 20......... Data 20 Data 14 Data 14 was lost earlier, but got 15 to 20 Retransmission fills in the hole at 14 103

Fast Retransmit (3) It can repair single segment loss quickly, typically before a timeout However, we have quiet time at the sender/receiver while waiting for the ACK to jump And we still need to MD cwnd 104

Inferring Non-Loss from ACKs Duplicate ACKs also give us hints about what data has arrived Each new duplicate ACK means that some new segment has arrived It will be the segments after the loss Thus advancing the sliding window will not increase the number of segments stored in the network 105

Fast Recovery First fast retransmit, and MD cwnd Then pretend further duplicate ACKs are the expected ACKs Lets new segments be sent for ACKs Reconcile views when the ACK jumps Ack 1 2 3 4 5 5 5 5 5 5 106

Fast Recovery (2) Third duplicate ACK, so send 14 Set ssthresh, cwnd = cwnd/2 More ACKs advance window; may send segments before jump Ack 12 Ack 13 Ack 13 Ack 13 Ack 13 Ack 13 Ack 13 Ack 20...... Exit Fast Recovery Data 20 Data 14 Data 21 Data 22 Data 14 was lost earlier, but got 15 to 20 Retransmission fills in the hole at 14 107

Fast Recovery (3) With fast retransmit, it repairs a single segment loss quickly and keeps the ACK clock running This allows us to realize AIMD No timeouts or slow-start after loss, just continue with a smaller cwnd TCP Reno combines slow-start, fast retransmit and fast recovery Multiplicative Decrease is ½ 108

TCP Reno TCP sawtooth MD of ½, no slow-start ACK clock running 109

TCP Reno, NewReno, and SACK Reno can repair one loss per RTT Multiple losses cause a timeout NewReno further refines ACK heuristics Repairs multiple losses without timeout SACK is a better idea Receiver sends ACK ranges so sender can retransmit without guesswork 110

Check out simulation at: http://guido.appenzeller.net/anims/ Or: goo.gl/sqmgwp Extent of subtitles 111

Computer Networks Explicit Congestion Notification

Congestion Avoidance vs. Control Classic TCP drives the network into congestion and then recovers Needs to see loss to slow down Would be better to use the network but avoid congestion altogether! Reduces loss and delay Question: how can we do this with router support? 113

Feedback Signals Delay and router signals can let us avoid congestion Signal Example Protocol Pros / Cons Packet loss Packet delay Router indication Classic TCP Cubic TCP (Linux) Compound TCP (Windows) TCPs with Explicit Congestion Notification Hard to get wrong Hear about congestion late Hear about congestion early Need to infer congestion Hear about congestion early Require router support 114

ECN (Explicit Congestion Notification) Router detects the onset of congestion via its queue When congested, it marks affected packets (IP header) 115

ECN (2) Marked packets arrive at receiver; treated as loss TCP receiver reliably informs TCP sender of the congestion 116

ECN (3) Advantages: Routers deliver clear signal to hosts Congestion is detected early, no loss No extra packets need to be sent Disadvantages: Routers and hosts must be upgraded 117

TCP Variants There are many different strains of TCP including: Loss-based congestion control: Reno, BIC, Cubic Delay-based congestion control: Vegas, Veno, Westwood High-speed congestion control: Scalable, HighSpeed, HTCP

Delay Based Congestion Control Basic idea: Before packet loss occurs, detect the early stage of congestion in the routers between source and destination Additively decrease the sending rate when incipient congestion is detected 119

TCP Vegas Expected = cwnd/basertt Actual = cwnd/rtt DIFF = (Expected-Actual) if ( DIFF*BaseRTT < α ) cwnd = cwnd + 1 else if ( DIFF*BaseRTT > β ) cwnd = cwnd 1 else cwnd = cwnd BaseRTT: the minimum of all measured RTT RTT: the actual round-trip time of a tagged packet α and β are constant values that are set by experimentation 120

TCP Vegas Modified Slow Start Try to find the correct window size without incurring a loss exponentially increasing its window every other RTT and use the other RTT to calculate DIFF As soon as Vegas detects queue buildup during slow start, it transitions to congestion avoidance 121

Cubic Two key modifications: Cubic window growth with inflection point at congestion window at previous loss Safe exit for slow start (i.e., transition from exponential growth to linear growth)

Multipath Mobile user WiFi and cellular at the same time High-end servers Multiple Ethernet cards Data centers Rich topologies with many paths Question: what are the benefits of multipath?

Multipath TCP Protocol 124

Working With Unmodified Apps Present the same socket API and expectations Identified by the five tuple (IP address, port #, protocol) From http://queue.acm.org/detail.cfm?id=2591369

Working With Unmodified Hosts Establish the TCP connection in the normal way Create a socket to a single remote IP address/port A B Each host tells its Initial Sequence Number (ISN) to the other host. And then add more subflows, if possible

Negotiating MPTCP Capability How do hosts know they both speak MPTCP? During the 3-way SYN/SYN-ACK/ACK handshake If SYN-ACK doesn t contain MP_CAPABLE Don t try to add any subflows!

Adding Subflows, Idealized How to associate a new subflow with the connection? Use a token generated from original subflow set-up How to start using the new subflow? Simply start sending packets with new IP/port pairs and associate them with the existing connection How could two end-points learn about extra IP addresses for establishing new subflows? Implicitly: one end-point establishes a new subflow, to already-known address(es) at the other end-point

Sequence Numbers Challenges across subflows Out-of-order packets due to RTT differences Access networks that rewrite sequence numbers Middleboxes upset by discontinuous TCP byte stream Need to retransmit lost packets on a different subflow Two levels of sequence numbers Sequence numbers per subflow Sequence numbers for the entire connection Enables Efficient detection of loss on each subflow Retransmission of lost packet on a different subflow

Receive Buffer Space Each TCP connection has a receive buffer Buffer space to store incoming data until it is read by the application TCP flow control Receiver advertises the available buffer space using the receive window Should each subflow have its own receive window? Starvation of some subflows in a connection? Fairness relative to other TCP connections? Fragmentation of the available buffer space? Instead, use a common receive window

Fairness and Efficiency in Multipath Congestion Control Slides from Damon Wischik

Goal #1: Fairness at Shared Bottlenecks A multipath TCP flow with two subflows Regular TCP To be fair, Multipath TCP should take as much capacity as TCP at a bottleneck link, no matter how many paths it is using.

Goal #2: Use Efficient Paths 12Mb/s 12Mb/s 12Mb/s Each flow has a choice of a 1-hop and a 2-hop path. How should split its traffic?

Use Efficient Paths 12Mb/s 8Mb/s 12Mb/ s 12Mb/ s 8Mb/s 8Mb/s If each flow split its traffic 1:1...

Use Efficient Paths 12Mb/s 12Mb/s If each flow split its traffic 2:1... 12Mb/s 9Mb/s 9Mb/s 9Mb/s

Use Efficient Paths 12Mb/ s 12Mb/s 12Mb/s 12Mb/s 12Mb/s 12Mb/s Better: Each connection on a one-hop path Each connection should send all traffic on the leastcongested paths

Use Efficient Paths 12Mb/ s 12Mb/s 12Mb/s 12Mb/s 12Mb/s 12Mb/s Better: Each connection on a one-hop path Each connection should send all traffic on the least-congested paths But keep some traffic on the alternate paths as a probe

Goal #3: Be Fair Compared to TCP Least-congested paths may not be best! Due to differences in round-trip time Two paths WiFi: high loss, low RTT Cellular: low loss, high RTT Using the least-congested path Choose the cellular path, due to low loss But, the RTT is high So throughput is low!

Be Fair Compared to TCP To be fair, Multipath TCP should give a connection at least as much throughput as it would get with a single-path TCP on the best of its paths. Ensure incentive for deploying MPTCP A Multipath TCP should take no more capacity on any path (or collection of paths) than if it was a single-path TCP flow using the best of those paths. Do no harm!

Achieving These Goals Regular TCP Maintain a congestion window w On an ACK, increase by 1/w (increase 1 per window) On a loss, decrease by w/2 MPTCP Maintain a congestion window per path w r On an ACK on path r, increase w r On a loss on path r, decrease by w r /2 How much to increase w r on an ACK?? If r is the only path at that bottleneck, increase by 1/w r

If Multiple Paths Share Bottleneck? Don t take any more bandwidth on a link than the best of the TCP paths would But, where might the bottlenecks be? Multiple paths might share the same bottleneck So, consider all possible subsets of the paths Set R of paths Subset S of R that includes path r E.g., consider path 3 Suppose paths 1, 3, and 4 share a bottleneck but, path 2 does not Then, we care about S = {1,3,4}

Achieving These Goals What is the best of these subflows achieving? Path s is achieving throughput of w s /RTT s So best path is getting max s (w s /RTT s ) What total bandwidth are these subflows getting? Across all subflows sharing that bottleneck Sum over s in S of w s /RTT s Consider the ratio of the two Increase by less if many subflows are sharing And pick the results for the set S with min ratio To account for the most paths sharing a bottleneck