Katz, Stoica F04 EECS 122: Introduction to Computer Networks TCP Variations Computer Science Division Department of Electrical Engineering and Computer.

Slides:



Advertisements
Similar presentations
Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.
Advertisements

Michele Pagano – A Survey on TCP Performance Evaluation and Modeling 1 Department of Information Engineering University of Pisa Network Telecomunication.
Congestion Control Reasons: - too many packets in the network and not enough buffer space S = rate at which packets are generated R = rate at which receivers.
CSCI-1680 Transport Layer III Congestion Control Strikes Back
1 TCP Congestion Control. 2 TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement.
ECE 4450:427/527 - Computer Networks Spring 2015
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
CS 268: Lecture 8 Router Support for Congestion Control Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 16: Congestion control II Slides used with.
CS 4700 / CS 5700 Network Fundamentals Lecture 12: Router-Aided Congestion Control (Drop it like it’s hot) Revised 3/18/13.
EE 122: Congestion Control The Sequel October 1, 2003.
Introduction 1 Lecture 14 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advanced Computer Networking Congestion Control for High Bandwidth-Delay Product Environments (XCP Algorithm) 1.
Congestion Control An Overview -Jyothi Guntaka. Congestion  What is congestion ?  The aggregate demand for network resources exceeds the available capacity.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
1 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
Lecture 9 Congestion Control: Part II EECS 122 University of California Berkeley.
Analysis and Simulation of a Fair Queuing Algorithm
High speed TCP’s. Why high-speed TCP? Suppose that the bottleneck bandwidth is 10Gbps and RTT = 200ms. Bandwidth delay product is packets (1500.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
1 Lecture 9: TCP and Congestion Control Slides adapted from: Congestion slides for Computer Networks: A Systems Approach (Peterson and Davis) Chapter 3.
Spring 2002CS 4611 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
Spring 2003CS 4611 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
CS 268: Lecture 8 (Router Support for Congestion Control) Ion Stoica February 19, 2002.
Data Communication and Networks
Computer Networking Lecture 17 – Queue Management As usual: Thanks to Srini Seshan and Dave Anderson.
Lecture 5: Congestion Control l Challenge: how do we efficiently share network resources among billions of hosts? n Last time: TCP n This time: Alternative.
Core Stateless Fair Queueing Stoica, Shanker and Zhang - SIGCOMM 98 Rigorous fair Queueing requires per flow state: too costly in high speed core routers.
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,
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.
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
CSE 461 University of Washington1 Topic How TCP implements AIMD, part 1 – “Slow start” is a component of the AI portion of AIMD Slow-start.
Link Scheduling & Queuing COS 461: Computer Networks
ACN: RED paper1 Random Early Detection Gateways for Congestion Avoidance Sally Floyd and Van Jacobson, IEEE Transactions on Networking, Vol.1, No. 4, (Aug.
Congestion Control - Supplementary Slides are adapted on Jean Walrand’s Slides.
CSCI-1680 Transport Layer III Congestion Control Strikes Back Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti, Ion Stoica Rodrigo.
9.7 Other Congestion Related Issues Outline Queuing Discipline Avoiding Congestion.
CSCI-1680 Transport Layer III Congestion Control Strikes Back Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti, Ion Stoica Rodrigo.
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
AQM & TCP models Courtesy of Sally Floyd with ICIR Raj Jain with OSU.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Winter 2008CS244a Handout 81 CS244a: An Introduction to Computer Networks Handout 8: Congestion Avoidance and Active Queue Management Nick McKeown Professor.
 Last Class  This Class  Chapter 6.3. ~ 6.4.  TCP congestion control.
Random Early Detection (RED) Router notifies source before congestion happens - just drop the packet (TCP will timeout and adjust its window) - could make.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
Congestion Avoidance Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
@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
Chapter 3 outline 3.1 transport-layer services
Congestion Control and AQM
Chapter 6 Congestion Avoidance
EE 122: Router Support for Congestion Control: RED and Fair Queueing
TCP, XCP and Fair Queueing
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
Computer Science Division
EECS 122: Introduction to Computer Networks TCP Variations
EE 122: Congestion Control The Sequel
Computer Science Division
Transport Layer: Congestion Control
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
Presentation transcript:

Katz, Stoica F04 EECS 122: Introduction to Computer Networks TCP Variations Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA

Katz, Stoica F04 2 Today’s Lecture: 11 Network (IP) Application Transport Link Physical 2 7, 8, 9 10, 11 17, 18, 19 14, 15, 16 21, 22,

Katz, Stoica F04 3 Outline  TCP congestion control -Quick Review -TCP flavors -Equation-based congestion control -Impact of losses -Cheating  Router-based support -RED -ECN -Fair Queueing -XCP

Katz, Stoica F04 4 Quick Review  Slow-Start: cwnd++ upon every new ACK  Congestion avoidance: AIMD if cwnd > ssthresh -ACK: cwnd = cwnd + 1/cwnd -Drop: ssthresh =cwnd/2 and cwnd=1  Fast Recovery: -duplicate ACKS: cwnd=cwnd/2 -Timeout: cwnd=1

Katz, Stoica F04 5 TCP Flavors  TCP-Tahoe -cwnd =1 whenever drop is detected  TCP-Reno -cwnd =1 on timeout -cwnd = cwnd/2 on dupack  TCP-newReno -TCP-Reno + improved fast recovery  TCP-Vegas, TCP-SACK

Katz, Stoica F04 6 TCP Vegas  Improved timeout mechanism  Decrease cwnd only for losses sent at current rate -avoids reducing rate twice  Congestion avoidance phase: -compare Actual rate (A) to Expected rate (E) -if E-A > , decrease cwnd linearly -if E-A < , increase cwnd linearly -rate measurements ~ delay measurements -see textbook for details!

Katz, Stoica F04 7 TCP-SACK  SACK = Selective Acknowledgements  ACK packets identify exactly which packets have arrived  Makes recovery from multiple losses much easier

Katz, Stoica F04 8 Standards?  How can all these algorithms coexist?  Don’t we need a single, uniform standard?  What happens if I’m using Reno and you are using Tahoe, and we try to communicate?

Katz, Stoica F04 9 Equation-Based CC  Simple scenario -assume a drop every k’th RTT (for some large k) -w, w+1, w+2,...w+k-1 DROP (w+k-1)/2, (w+k-1)/2+1,...  Observations: -In steady state: w= (w+k-1)/2 so w=k-1 -Average window: 1.5(k-1) -Total packets between drops: 1.5k(k-1) -Drop probability: p = 1/[1.5k(k-1)]  Throughput: T ~ (1/RTT)*sqrt(3/2p)

Katz, Stoica F04 10 Equation-Based CC  Idea: -Forget complicated increase/decrease algorithms -Use this equation T(p) directly!  Approach: -measure drop rate (don’t need ACKs for this) -send drop rate p to source -source sends at rate T(p)  Good for streaming audio/video that can’t tolerate the high variability of TCP’s sending rate

Katz, Stoica F04 11 Question!  Why use the TCP equation?  Why not use any equation for T(p)?

Katz, Stoica F04 12 Cheating  Three main ways to cheat: -increasing cwnd faster than 1 per RTT -using large initial cwnd -Opening many connections

Katz, Stoica F04 13 Increasing cwnd Faster AB x DE y Limit rates: x = 2y C x y x increases by 2 per RTT y increases by 1 per RTT

Katz, Stoica F04 14 Increasing cwnd Faster AB x DE y

Katz, Stoica F04 15 Larger Initial cwnd AB x DE y x starts SS with cwnd = 4 y starts SS with cwnd = 1

Katz, Stoica F04 16 Open Many Connections AB x DE y Assume A starts 10 connections to B D starts 1 connection to E Each connection gets about the same throughput Then A gets 10 times more throughput than D

Katz, Stoica F04 17 Cheating and Game Theory AB x DE y 22, 2210, 35 35, 1015, 15 (x, y) A Increases by 1 Increases by 5 D  Increases by 1 Increases by 5 Individual incentives: cheating pays Social incentives: better off without cheating Classic PD: resolution depends on accountability Too aggressive  Losses  Throughput falls

Katz, Stoica F04 18 Lossy Links  TCP assumes that all losses are due to congestion  What happens when the link is lossy?  Recall that Tput ~ 1/sqrt(p) where p is loss prob.  This applies even for non-congestion losses

Katz, Stoica F04 19 Example p = 0 p = 1% p = 10%

Katz, Stoica F04 What can routers do to help?

Katz, Stoica F04 21 Paradox  Routers are in middle of action  But traditional routers are very passive in terms of congestion control -FIFO -Drop-tail

Katz, Stoica F04 22 FIFO: First-In First-Out  Maintain a queue to store all packets  Send packet at the head of the queue Queued packets Arriving packet Next to transmit

Katz, Stoica F04 23 Tail-drop Buffer Management  Drop packets only when buffer is full  Drop arriving packet Arriving packet Next to transmit Drop

Katz, Stoica F04 24 Ways Routers Can Help  Packet scheduling: non-FIFO scheduling  Packet dropping: -not drop-tail -not only when buffer is full  Congestion signaling

Katz, Stoica F04 25 Question!  Why not use infinite buffers? -no packet drops!

Katz, Stoica F04 26 The Buffer Size Quandary  Small buffers: -often drop packets due to bursts -but have small delays  Large buffers: -reduce number of packet drops (due to bursts) -but increase delays  Can we have the best of both worlds?

Katz, Stoica F04 27 Random Early Detection (RED)  Basic premise: -router should signal congestion when the queue first starts building up (by dropping a packet) -but router should give flows time to reduce their sending rates before dropping more packets  Therefore, packet drops should be: -early: don’t wait for queue to overflow -random: don’t drop all packets in burst, but space drops out

Katz, Stoica F04 28 RED  FIFO scheduling  Buffer management: -Probabilistically discard packets -Probability is computed as a function of average queue length (why average?) Discard Probability Average Queue Length 0 1 min_thmax_th queue_len

Katz, Stoica F04 29 RED (cont’d)  min_th – minimum threshold  max_th – maximum threshold  avg_len – average queue length -avg_len = (1-w)*avg_len + w*sample_len Discard Probability Average Queue Length 0 1 min_thmax_th queue_len

Katz, Stoica F04 30 RED (cont’d)  If (avg_len < min_th)  enqueue packet  If (avg_len > max_th)  drop packet  If (avg_len >= min_th and avg_len < max_th)  enqueue packet with probability P Discard Probability (P) Average Queue Length 0 1 min_thmax_th queue_len

Katz, Stoica F04 31 RED (cont’d)  P = max_P*(avg_len – min_th)/(max_th – min_th)  Improvements to spread the drops (see textbook) Discard Probability Average Queue Length 0 1 min_thmax_th queue_len avg_len P max_P

Katz, Stoica F04 32 Average vs Instantaneous Queue

Katz, Stoica F04 33 RED Advantages  High network utilization with low delays  Average queue length small, but capable of absorbing large bursts  Many refinements to basic algorithm make it more adaptive (requires less tuning)

Katz, Stoica F04 34 Explicit Congestion Notification  Rather than drop packets to signal congestion, router can send an explicit signal  Explicit congestion notification (ECN): -instead of optionally dropping packet, router sets a bit in the packet header -If data packet has bit set, then ACK has ECN bit set  Backward compatibility: -bit in header indicates if host implements ECN -note that not all routers need to implement ECN

Katz, Stoica F04 35 Picture W W/2 AB

Katz, Stoica F04 36 ECN Advantages  No need for retransmitting optionally dropped packets  No confusion between congestion losses and corruption losses

Katz, Stoica F04 37 Remaining Problem  Internet vulnerable to CC cheaters!  Single CC standard can’t satisfy all applications -EBCC might answer this point  Goal: -make Internet invulnerable to cheaters -allow end users to use whatever congestion control they want  How?

Katz, Stoica F04 38 One Approach: Nagle (1987)  Round-robin among different flows -one queue per flow

Katz, Stoica F04 39 Round-Robin Discussion  Advantages: protection among flows -Misbehaving flows will not affect the performance of well- behaving flows Misbehaving flow – a flow that does not implement any congestion control -FIFO does not have such a property  Disadvantages: -More complex than FIFO: per flow queue/state -Biased toward large packets – a flow receives service proportional to the number of packets

Katz, Stoica F04 40 Solution?  Bit-by-bit round robin  Can you do this in practice?  No, packets cannot be preempted (why?)  …we can only approximate it

Katz, Stoica F04 41 Fair Queueing (FQ)  Define a fluid flow system: a system in which flows are served bit-by-bit  Then serve packets in the increasing order of their deadlines  Advantages -Each flow will receive exactly its fair rate  Note: -FQ achieves max-min fairness

Katz, Stoica F04 42 Max-Min Fairness  Denote -C – link capacity -N – number of flows -r i – arrival rate  Max-min fair rate computation: 1.compute C/N 2.if there are flows i such that r i <= C/N, update C and N 3.if no, f = C/N; terminate 4.go to 1  A flow can receive at most the fair rate, i.e., min(f, r i )

Katz, Stoica F04 43 Example  C = 10; r 1 = 8, r 2 = 6, r 3 = 2; N = 3  C/3 = 3.33  C = C – r3 = 8; N = 2  C/2 = 4; f = f = 4 : min(8, 4) = 4 min(6, 4) = 4 min(2, 4) = 2 10

Katz, Stoica F04 44 Implementing Fair Queueing  Idea: serve packets in the order in which they would have finished transmission in the fluid flow system

Katz, Stoica F04 45 Example Flow 1 (arrival traffic) Flow 2 (arrival traffic) Service in fluid flow system Packet system time

Katz, Stoica F04 46 System Virtual Time: V(t)  Measure service, instead of time  V(t) slope – rate at which every active flow receives service -C – link capacity -N(t) – number of active flows in fluid flow system at time t Service in fluid flow system time V(t)

Katz, Stoica F04 47 Fair Queueing Implementation  Define - - finishing time of packet k of flow i (in system virtual time reference system) - - arrival time of packet k of flow i - - length of packet k of flow i  The finishing time of packet k+1 of flow i is

Katz, Stoica F04 48 FQ Advantages  FQ protect well-behaved flows from ill-behaved flows  Example: 1 UDP (10 Mbps) and 31 TCP’s sharing a 10 Mbps link

Katz, Stoica F04 49 Alternative Implementations of Max-Min  Deficit round-robin  Core-stateless fair queueing -label packets with rate -drop according to rates -check at ingress to make sure rates are truthful  Approximate fair dropping -keep small sample of previous packets -estimate rates based on these -apply dropping as above -wins because few large flows per-elephant state, not per-mouse state  RED-PD: not max-min, but punishes big cheaters

Katz, Stoica F04 50 Big Picture  FQ does not eliminate congestion  it just manages the congestion  You need both end-host congestion control and router support for congestion control -end-host congestion control to adapt -router congestion control to protect/isolate

Katz, Stoica F04 51 Explicit Rate Signaling (XCP)  Each packet contains: cwnd, RTT, feedback field  Routers indicate to flows whether to increase or decrease: -give explicit rates for increase/decrease amounts -feedback is carried back to source in ACK  Separation of concerns: -aggregate load -allocation among flows

Katz, Stoica F04 52 XCP (continued)  Aggregate: -measures spare capacity and avg queue size -computes desired aggregate change: D=aRS-bQ  Allocation: -uses AIMD -positive feedback is same for all flows -negative feedback is proportional to current rate -when D=0, reshuffle bandwidth -all changes normalized by RTT want equal rates, not equal windows

Katz, Stoica F04 53 XCP (continued)  Challenge: -how to give per-flow feedback without per-flow state? -do you keep track of which flows you’ve signaled and which you haven’t?  Solution: -figure out desired change -divide from expected number of packets from flow in time interval -give each packet share of rate adjustment -flow totals up all rate adjustment