Presentation is loading. Please wait.

Presentation is loading. Please wait.

Congestion Control Tanenbaum 5.3, 6.5. 6/12/2015Congestion Control (A Loss Based Technique: TCP)2 What? Why? Congestion occurs when –there is no reservation.

Similar presentations


Presentation on theme: "Congestion Control Tanenbaum 5.3, 6.5. 6/12/2015Congestion Control (A Loss Based Technique: TCP)2 What? Why? Congestion occurs when –there is no reservation."— Presentation transcript:

1 Congestion Control Tanenbaum 5.3, 6.5

2 6/12/2015Congestion Control (A Loss Based Technique: TCP)2 What? Why? Congestion occurs when –there is no reservation –Demand exceeds Resources If congestion persists, resources must be increased If congestion happens in short bursts, buffers can avoid packet losses to some extent.

3 6/12/2015Congestion Control (A Loss Based Technique: TCP)3 Congestion Control, How? Network Layer –Congestion control point to point Transport Layer –Congestion control end-to-end Packets Delivered Packets Sent Maximum capacity of bottleneck link Objective Congestion Congestion Collapse

4 6/12/2015Congestion Control (A Loss Based Technique: TCP)4 Network As Black Box Network/ Network Element Load State variable u What can U be? Round trip time (e2e) Packet loss (e2e or p2p) Link utilization (p2p) Queue size (p2p) Throughput (e2e)

5 6/12/2015Congestion Control (A Loss Based Technique: TCP)5 Congestion Control in Packet Switched Networks Monitor some system state variable u u may be link utilization (p2p), loss rate (p2p or e2e) Instantaneous u now Average value u computed as: –u new = .u last + (1-  ) u now –0 <=  <= 1 Use of thresholds

6 6/12/2015Congestion Control (A Loss Based Technique: TCP)6 Congestion Control: Strategies Open loop –Prevent congestion by design –E.g., resource reservation, admission control Closed loop –Monitor some characteristics of system –Inform key elements that can take action –Adjust system operation whenever needed

7 End-to-end Congestion Control

8 6/12/2015Congestion Control (A Loss Based Technique: TCP)8 Network As Black Box Network Window Size Or Rate Packet Loss, Round trip time, or Throughput

9 Packet Loss Based Congestion Control TCP Congestion Control (Read Van Jacobson, “Congestion Avoidance and Control,” Sigcomm’88)

10 6/12/2015Congestion Control (A Loss Based Technique: TCP)10 System (Connection) In Equilibrium Time Bandwidth High Speed LANs Slow long-haul link

11 6/12/2015Congestion Control (A Loss Based Technique: TCP)11 Keeping A System in Equilibrium Suppose that a system is in equilibrium, how to keep it there? –If there are no losses, easy: just send a packet whenever an ack is received. –If losses occur, we need to distinguish between delayed packets (link capacity shortage) and lost packets  need an accurate retransmission timer.

12 6/12/2015Congestion Control (A Loss Based Technique: TCP)12 How to Get A System To Equilibrium? At the beginning, no packet is sent yet. Propose a strategy. Let us discuss some strategies: Strategy 1: Blast a guessed number of packets. Strategy 2: Start with sending one packet (WS=1) and wait 1. when ack is received, send two packets (WS=2) 2.For each ack, send one packet, plus one packet when all window is acked (WS=3)

13 6/12/2015Congestion Control (A Loss Based Technique: TCP)13 How to Get A System To Equilibrium? Strategy 2 may be inefficient Consider a download of a 21 KB file using a 1 KB segment size over a 45 Mbps link with 25ms one way latency. Compute the efficiency of such a transfer

14 6/12/2015Congestion Control (A Loss Based Technique: TCP)14 How to Get A System To Equilibrium? (Strategy 2) TimeWSSegments DeliveredThroughputEfficiency RTT11160 Kbps0.3% 2 RTT23320 Kbps0.7% 3 RTT36480 Kbps1.0% 4 RTT410640 Kbps1.4% 5 RTT515800 Kbps1.7% 6 RTT621960 Kbps2.1%

15 6/12/2015Congestion Control (A Loss Based Technique: TCP)15 A Faster Strategy: Slow Start For each acked packet, increase window by 1

16 6/12/2015Congestion Control (A Loss Based Technique: TCP)16 Slow-Start to Get A System To Equilibrium? (Strategy 2) TimeWSSegments DeliveredThroughputEfficiency RTT11160 Kbps0.3% 2 RTT23320 Kbps0.5% 3 RTT47640 Kbps1.4% 4 RTT8151.28 Mbps2.8% 5 RTT1621--------- 6 RTT

17 6/12/2015Congestion Control (A Loss Based Technique: TCP)17 A System in Equilibrium May UNDERUTILIZE the Link Capacity If losses do not happen, this is an indication that link capacity may not be fully utilized What to do? –Slightly INCREASE the window size after a complete window of data made it safely through the network (this happens every round trip time.)  Congestion avoidance phase

18 6/12/2015Congestion Control (A Loss Based Technique: TCP)18 TCP Congestion Avoidance and Control Start with congestion window=1 (CWND) Use slow start until CWND reaches the threshold sstresh (sstresh is half the congestion window vale reached when last loss occured) From CWND=sstresh, use congestion avoidance

19 6/12/2015Congestion Control (A Loss Based Technique: TCP)19 Example Round trip time CWND

20 6/12/2015Congestion Control (A Loss Based Technique: TCP)20 Code When a packet is acked if cwnd < ssthresh* { /* Slow-Start: increment cwnd every ack*/ cwnd = cwnd + 1; } else { /* Congestion avoidance: increment cwnd every RTT */ cwnd = cwnd + 1/cwnd } When a packet is lost (timeout) ssthresh = cwnd / 2; cwnd = init_cwnd; * ssthresh may be dynamically adjusted at start-up (see Janey Hoe work)

21 6/12/2015Congestion Control (A Loss Based Technique: TCP)21 Fast Recovery/ Fast Retransmit When 3 rd dupack received: –Fast Recovery: ssthresh = cwnd / 2; cwnd = ssthresh + 3; –Fast Retransmit: Retransmit missing packet without waiting for timeout

22 6/12/2015Congestion Control (A Loss Based Technique: TCP)22 Example Round trip time CWND 2 4 8 16

23 6/12/2015Congestion Control (A Loss Based Technique: TCP)23 TCP Performance: A Simple Derivation Mathis et. Al: "The Macroscopic Behavior of the TCP Congestion Avoidance Algorithm” Assume –a very simple loss model: periodical loss with loss rate p –No timeout –Neglect the start-up behavior

24 6/12/2015Congestion Control (A Loss Based Technique: TCP)24 TCP Performance: A Simple Derivation (2) cwnd W Startup Before Stabiliza. 0 loss (RTT) W/2 loss W 3W/2 loss W/2

25 6/12/2015Congestion Control (A Loss Based Technique: TCP)25 TCP Performance (3) Facts: –A loss happens whenever packets are sent (periodical loss model). –A loss happens every RTTs –The total number of packets sent every cycle (time between consecutive 2 losses) is the area under the curve. –The area is

26 6/12/2015Congestion Control (A Loss Based Technique: TCP)26 TCP Performance (4) Facts (cont’d): –The number of packets delivered per cycle is – Solving, –Throughput = # packets received per cycle/cycle duration –Throughput = (packets per second)

27 6/12/2015Congestion Control (A Loss Based Technique: TCP)27 Taking Into Account Timeout Jitendra Padhye et. Al “Modeling TCP Reno Performance: A Simple Model and Its Empirical Validation”. Wmax : Max window size (flow control) RTT: round trip time b = # of packets received by an ack. p: probability of packet loss To= Duration of first timeout

28 6/12/2015Congestion Control (A Loss Based Technique: TCP)28 Shortcomings/Limits of TCP TCP is not suited for streams => how to exercise TCP like congestion control on streams (UDP)? TCP, as is, will not scale well to very high speeds => How to adapt TCP to very high speed networks?

29 6/12/2015Congestion Control (A Loss Based Technique: TCP)29 Impact of Policies on Congestion Control Link Layer policies –Retransmission –Out-of-order caching –Acknowledgement –Flow control

30 6/12/2015Congestion Control (A Loss Based Technique: TCP)30 Impact of Policies on Congestion Control (2) Network Layer policies –Virtual circuit/datagram –Packet scheduling –Queue management –Routing algorithm –Packet lifetime management

31 6/12/2015Congestion Control (A Loss Based Technique: TCP)31 Impact of Policies on Congestion Control (3) Transport Layer policies –Retransmission –Out-of-order caching –Acknowledgement –Flow control –Timeout determination

32 6/12/2015Congestion Control (A Loss Based Technique: TCP)32 Congestion Control in Packet Switched Networks Monitor some system state variable u u may be link utilization, loss rate Instantaneous u now Average value u computed as: –u new = .u last + (1-  ) u now –0 <=  <= 1 Use of thresholds

33 6/12/2015Congestion Control (A Loss Based Technique: TCP)33 Techniques at Link Layer DECBit (Warning bit) Source Quench packets (choke packets) Hop-by-hop choke packets Load shedding RED


Download ppt "Congestion Control Tanenbaum 5.3, 6.5. 6/12/2015Congestion Control (A Loss Based Technique: TCP)2 What? Why? Congestion occurs when –there is no reservation."

Similar presentations


Ads by Google