Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS/EE 145A Congestion Control Netlab.caltech.edu/course.

Similar presentations


Presentation on theme: "CS/EE 145A Congestion Control Netlab.caltech.edu/course."— Presentation transcript:

1 CS/EE 145A Congestion Control Netlab.caltech.edu/course

2 Congestion Control Why do we need congestion control? Why do we need congestion control? Design issues Design issues Implementation issues Implementation issues Lab 4 Lab 4

3 Why do we need congestion control? Rate Based Control Rate Based Control L(i): The set of links that connection i uses x i : the sending rate of connection i Otherwise … Otherwise … Persistent Packet Loss Receiver has to get a huge buffer for reassembly L2K-> oo3LLL78

4 Window based control ~ W packets per RTT ~ W packets per RTT RTT time Source Destination 12W12W12W data ACKs 12W w?

5 Window based control Ack Clocking Ack Clocking SR Router: C pkt/sec Sender: W packet per RTT RTT=propagation delay + queueing delay Receiver: W~2W buffer At time 0 … 12345

6 Window based control Ack Clocking Ack Clocking SR Router: C pkt/sec Sender: W packet per RTT RTT=propagation delay + queueing delay Receiver: W~2W buffer Packets leave the router at C pkt/sec 12345W678

7 Window based control Ack Clocking Ack Clocking S R Router: C pkt/sec Sender: W packet per RTT RTT=propagation delay + queueing delay Receiver: W~2W buffer Acknowledgment goes back at C pkt/sec A1A2A3A4A5 AW A6A7A8

8 Window based control Ack Clocking Ack Clocking S R Router: C pkt/sec Sender: W packet per RTT RTT=propagation delay + queueing delay Receiver: W~2W buffer The sender sends one packet for each acknowledgement New packets leaves the sender at C pkt/sec! 4321 A5AWA6A7A8

9 Window based control Ack Clocking Ack Clocking S R Router: C pkt/sec Sender: W packet per RTT RTT=propagation delay + queueing delay Receiver: W~2W buffer If the router has infinite buffer … The window based control can have correct sending rate??? 4321 A5AWA6A7A8

10 If the router has infinite buffer … Not Really … Not Really … 1985: J. Nagle (RFC 970) S R 12345W678 Queueing delay Experienced by Packet i:  1986: Lixia Zhang (Why TCP timers Don ’ t work well, Sigcomm 86)

11 We need congestion control Because … It is very difficult, if not impossible, to have accurate RTT measurement. Hence timeout cannot work well with packet loss … It is very difficult, if not impossible, to have accurate RTT measurement. Hence timeout cannot work well with packet loss … The router has finite buffer The router has finite buffer

12 We need congestion control Because … It is very difficult, if not impossible, to have accurate RTT measurement It is very difficult, if not impossible, to have accurate RTT measurement Have better or more conservative RTT measurement to prevent congestion collapse Have better or more conservative RTT measurement to prevent congestion collapse The router has finite buffer The router has finite buffer Change the window (W) according to packet loss Change the window (W) according to packet loss --Van Jacobson (Sigcomm 88)

13 We need congestion control Because … It is very difficult, if not impossible, to have accurate RTT measurement It is very difficult, if not impossible, to have accurate RTT measurement  Have better or more conservative RTT measurement to prevent congestion collapse The router has finite buffer The router has finite buffer  Change the window (W) according to packet loss Tons of papers afterward …

14 We need congestion control 2000: Sally Floyd: Goal of Congestion Control (RFC 2914) Preventing congestion collapse Preventing congestion collapse Fairness between different connections Fairness between different connections Optimizing performance regarding throughput, delay, and loss. Optimizing performance regarding throughput, delay, and loss. Stability as in control theory Stability as in control theory

15 Basic Ideas

16 Three Questions that a congestion control algorithm should answer: How frequent to make decision How frequent to make decision Decision function Decision function How to Increase/Decrease Window How to Increase/Decrease Window --Raj Jain

17 How Frequent? Possible events … Possible events … Per Packet (acknowledgement) Per RTT (window) Per Loss Per Connection

18 Decision Function

19

20 Congestion Signals Packet Loss Packet Loss Queueing delay Queueing delay Explicit Congestion Notification (ECN) Explicit Congestion Notification (ECN)

21 Congestion Signal Queueing delay ECN Loss TFRC p=p* DUAL q>q_max/2? Vegas q=q* CARD q>0? Goodput

22 Decision Function using Binary Signal Simple Simple Natural Natural Robust Robust Oscillate Oscillate Less Information? Less Information?

23 Congestion Signal Loss Loss Delay Delay ECN ECN Delay-BasedLoss-Based Multi-Valued Signal FAST / Vegas TFRC Binary Signal CARD / DUAL Reno / HSTCP / ScalableTCP

24 Increase / Decrease Function

25 I/D Function (I): AIMD

26 AIMD: Fairness

27 I/D Function (II): Equation Based

28 Equation Based Protocol: Fairness

29 A Case Study: TCP Reno CA Decision Frequency: Decision Frequency: each RTT and each Loss Decision function: Decision function: Loss=0 or Loss=1? Increase / Decrease function: AIMD Increase / Decrease function: AIMD Loss=0: w=w+1 (a=1) each RTT Loss=1: w=w/2 (b=1/2) each RTT

30 TCP Reno: Slow Start When Window is too small: Increase / Decrease function: Slow Start Increase / Decrease function: Slow Start Loss=0: w=w*2 each RTT Loss=1: w=w/2 (b=1/2) each RTT How do we know if the window is too small? Longer History is recorded by SSThresh Longer History is recorded by SSThresh: Initialization: SSThresh = oo Loss=1: SSThresh =w/2

31 Challenges

32 Implementation: Measurement Reality l q

33 Loss Detection Loss DetectionACK; Selective ACK; Control Packet Round Trip Delay Measurement Round Trip Delay Measurement Sender side Timestamp On packet timestamp

34 When one packet loss is detected Assume All the packets sent but not acknowledged are lost All the packets sent but not acknowledged are lost All the packets sent but not acknowledged are in flight All the packets sent but not acknowledged are in flight All the packets sent but not acknowledged are received All the packets sent but not acknowledged are received RTT time Source Destination 12W 2W 12W ACK=1

35 Implementation: Measurement Noise Filters: Exponential Weighted Moving Average Exponential Weighted Moving Average Variance Measurement Variance Measurement

36 Implementation: Control Reality w

37 How to enforce “ one window of packet ” is sent each RTT? How to enforce “ one window of packet ” is sent each RTT? If the window does not change and there is no packet loss … If the window does not change and there is no packet loss … If window changes and there is no loss … If window changes and there is no loss … If there is loss … If there is loss …

38 Implementation: Measurement Reality f

39 Implementation: Control Measure the packets in flight Measure the packets in flight Initialization Initialization When a packet is sent When a packet is sent When an acknowledgement is received When an acknowledgement is received When a packet loss is detected When a packet loss is detected Enforce the congestion control: Enforce the congestion control: Packets in flight <= window

40 Implementation Reality f Reality l q w

41 Implementation: Bottleneck in the Receiver If we send w packets in one RTT, the receiver side should have free buffer for at least w packets. If we send w packets in one RTT, the receiver side should have free buffer for at least w packets. What happen if the receiver has not enough buffer? “ Advertised window ” from receiver. What happen if the receiver has not enough buffer? “ Advertised window ” from receiver. L2W345678

42 Lab 4

43 Finish our “ big project ” How to split a file into packets? How to split a file into packets? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to recover from packets reordering? How to recover from packets reordering? How to recover from loss? How to recover from loss? How to use the bandwidth efficiently? How to use the bandwidth efficiently? How to share the bandwidth fairly? How to share the bandwidth fairly? …

44 Lab 4 - Task Design and implement a congestion control mechanism based on the reliable transmission protocol in Lab 3 Design and implement a congestion control mechanism based on the reliable transmission protocol in Lab 3 Choose the congestion signals Choose the congestion signals Design the response function Design the response function Implement the algorithm (measurement and control) Implement the algorithm (measurement and control) Analyze your algorithm (equilibrium analysis and stability analysis) Analyze your algorithm (equilibrium analysis and stability analysis)

45 Lab 4 - Requirements Clearly write down your design  How do you choose congestion signal  How do you choose decision function and increase / decrease function  How do you measure the inputs  How do you control the rate Etc …

46 Lab 4 - Requirements Implementation  Based on the codes of Lab 3  Maximize the goodput  Achieve reasonable fairness when sharing the same bottleneck with other connections running the same protocol

47 Lab 4 - Requirements Analysis  In what kind of environments does your design work well?  Any possible environments that your design does not work?  Is your protocol fair?  Is your protocol stable? Etc …

48 Lab 4 - Possible Problems Measurement of RTT and Loss Measurement of RTT and Loss Control the packets in flight Control the packets in flight Adapt to different environments Adapt to different environments Testing: Testing: FreeBSD: Dummynet Linux: NIST

49 Lab 4 - Tips Refer to the Textbook and reference books Refer to the Textbook and reference books Refer to RFCs Refer to RFCs RFC 2581: TCP Congestion Control RFC 2581: TCP Congestion Control RFC 2582: The New Reno Modification to TCP's Fast Recovery Algorithm RFC 2582: The New Reno Modification to TCP's Fast Recovery Algorithm Refer to one or two classical papers Refer to one or two classical papers Congestion Avoidance and Control Van Jacobson, Michael J. Karels; SIGCOMM 1988; LBL, UC Berkeley Congestion Avoidance and Control Van Jacobson, Michael J. Karels; SIGCOMM 1988; LBL, UC Berkeley A Delay-Based Approach for Congestion Avoidance in Interconnected Heterogeneous Computer Networks Raj Jain, SICOMM 1988, Digital Equipment Corporation A Delay-Based Approach for Congestion Avoidance in Interconnected Heterogeneous Computer Networks Raj Jain, SICOMM 1988, Digital Equipment Corporation Re-Use the codes in Lab 3 Re-Use the codes in Lab 3

50 Lab 4 Due: Dec 5 th (Friday) 23:59:59 Due: Dec 5 th (Friday) 23:59:59 Email: weixl@caltech.edu Email: weixl@caltech.eduweixl@caltech.edu Grading Grading 50%: Design 50%: Design 30%: Implementation 30%: Implementation 20%: Analysis 20%: Analysis TA hours: TA hours: Tue / Thu (20:00 – 22:00) JRG 170


Download ppt "CS/EE 145A Congestion Control Netlab.caltech.edu/course."

Similar presentations


Ads by Google