Lecture 2: Congestion Control and Avoidance

2,371
-1

Published on

Published in: Education, Technology, Business
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,371
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Lecture 2: Congestion Control and Avoidance

  1. 1. Congestion Avoidance! and Control 21 August 2009 CS5229 Semester 1 2009/10 1
  2. 2. Van Jacobson, “Congestion Avoidance and Control”, " SIGCOMM 1988 21 August 2009 CS5229 Semester 1 2009/10 2
  3. 3. Fixes to TCP in BSD" Handwaving arguments" Less rigorous math" Lots of “magical” hacks 21 August 2009 CS5229 Semester 1 2009/10 3
  4. 4. We assume " - the sender always has data to send" - each packet is of the same size" - TCP is message-oriented 21 August 2009 CS5229 Semester 1 2009/10 4
  5. 5. cwnd: congestion window" swnd: usable sending window " rwnd: advertised receiver’s window 21 August 2009 CS5229 Semester 1 2009/10 5
  6. 6. 1986 21 August 2009 CS5229 Semester 1 2009/10 6
  7. 7. TCP throughput from LBL to UC Berkeley (two hops) dropped from 32K bps to 40 bps. 21 August 2009 CS5229 Semester 1 2009/10 7
  8. 8. RFC793 21 August 2009 CS5229 Semester 1 2009/10 8
  9. 9. Sending window = receiving window" No congestion control" Retransmit only when timeout 21 August 2009 CS5229 Semester 1 2009/10 9
  10. 10. Congestion Collapse: " sender sends too fast" routers delay/drop packets" sender retransmit" no useful data getting through 21 August 2009 CS5229 Semester 1 2009/10 10 10
  11. 11. 21 August 2009 CS5229 Semester 1 2009/10 11 11
  12. 12. Observation: a TCP connection should obey" Conservation ! of ! Packets 21 August 2009 CS5229 Semester 1 2009/10 12 12
  13. 13. In equilibrium state, a new packet is not inserted until an old packet leaves. 21 August 2009 CS5229 Semester 1 2009/10 13 13
  14. 14. 21 August 2009 CS5229 Semester 1 2009/10 14 14
  15. 15. How could this principle be violated? 21 August 2009 CS5229 Semester 1 2009/10 15 15
  16. 16. 1. Never reaches equilibrium 21 August 2009 CS5229 Semester 1 2009/10 16 16
  17. 17. 2. Inject a packet before the next packet leaves 21 August 2009 CS5229 Semester 1 2009/10 17 17
  18. 18. 1. Getting to the equilibrium state 21 August 2009 CS5229 Semester 1 2009/10 18 18
  19. 19. Equilibrium state: " self-clocking 21 August 2009 CS5229 Semester 1 2009/10 19 19
  20. 20. 21 August 2009 CS5229 Semester 1 2009/10 20 20
  21. 21. How to start the ‘clock’? 21 August 2009 CS5229 Semester 1 2009/10 21 21
  22. 22. Slow Start 21 August 2009 CS5229 Semester 1 2009/10 22 22
  23. 23. Add a new variable cwnd." Start/Restart: cwnd = 1." Upon receiving ACK, cwnd++." Send at most min(cwnd,rwin) 21 August 2009 CS5229 Semester 1 2009/10 23 23
  24. 24. 21 August 2009 CS5229 Semester 1 2009/10 24 24
  25. 25. Never send more than 2x the max possible rate." (previously 200x is possible!) 21 August 2009 CS5229 Semester 1 2009/10 25 25
  26. 26. 21 August 2009 CS5229 Semester 1 2009/10 26 26
  27. 27. 2. Inject a packet before the next packet leaves 21 August 2009 CS5229 Semester 1 2009/10 27 27
  28. 28. 2. Conservation at Equilibrium 21 August 2009 CS5229 Semester 1 2009/10 28 28
  29. 29. Something’s wrong with TCP timer 21 August 2009 CS5229 Semester 1 2009/10 29 29
  30. 30. 21 August 2009 CS5229 Semester 1 2009/10 30 30
  31. 31. TCP (RFC793) Ri : smoothed RTT Mi : measured RTT RTO : timeout value 21 August 2009 CS5229 Semester 1 2009/10 31 31
  32. 32. Variation in RTT when network is loaded 21 August 2009 CS5229 Semester 1 2009/10 32 32
  33. 33. β = 2 (recommended) tolerates only 30% load 21 August 2009 CS5229 Semester 1 2009/10 33 33
  34. 34. Idea: estimate the variation and use in calculating RTO 21 August 2009 CS5229 Semester 1 2009/10 34 34
  35. 35. Measuring Variation" variance: " costly (need to square)" mean error:" simpler 21 August 2009 CS5229 Semester 1 2009/10 35 35
  36. 36. 21 August 2009 CS5229 Semester 1 2009/10 36 36
  37. 37. 21 August 2009 CS5229 Semester 1 2009/10 37 37
  38. 38. 21 August 2009 CS5229 Semester 1 2009/10 38 38
  39. 39. 21 August 2009 CS5229 Semester 1 2009/10 39 39
  40. 40. To prevent spurious timeout, 21 August 2009 CS5229 Semester 1 2009/10 40 40
  41. 41. To pick a value of k, consider bandwidth- dominated link. 21 August 2009 CS5229 Semester 1 2009/10 41 41
  42. 42. 21 August 2009 CS5229 Semester 1 2009/10 42 42
  43. 43. R doubles each round during slow-start. 21 August 2009 CS5229 Semester 1 2009/10 43 43
  44. 44. 21 August 2009 CS5229 Semester 1 2009/10 44 44
  45. 45. 21 August 2009 CS5229 Semester 1 2009/10 45 45
  46. 46. 21 August 2009 CS5229 Semester 1 2009/10 46 46
  47. 47. 21 August 2009 CS5229 Semester 1 2009/10 47 47
  48. 48. 3. Moving towards new equilibrium when path changes 21 August 2009 CS5229 Semester 1 2009/10 48 48
  49. 49. Idea: adjust cwnd when congestion happens 21 August 2009 CS5229 Semester 1 2009/10 49 49
  50. 50. Assume: congestion leads to packet loss, leads to timeout. 21 August 2009 CS5229 Semester 1 2009/10 50 50
  51. 51. On timeout, cwnd /= 2" On ACK, cwnd += 1/cwnd 21 August 2009 CS5229 Semester 1 2009/10 51 51
  52. 52. Why drop by half ?" 1. Slow-start: " we know R/2 works" 2. Steady state:" a new flow probably? 21 August 2009 CS5229 Semester 1 2009/10 52 52
  53. 53. Combining " slow-start " and " congestion avoidance 21 August 2009 CS5229 Semester 1 2009/10 53 53
  54. 54. TCP Tahoe 21 August 2009 CS5229 Semester 1 2009/10 54 54
  55. 55. 14 cwnd 12 ssthresh 10 8 6 4 2 0 21 August 2009 CS5229 Semester 1 2009/10 55 55
  56. 56. 21 August 2009 CS5229 Semester 1 2009/10 56 56
  57. 57. cwnd: " “pipe size” probed" ssthresh: " “pipe size” during equilibrium 21 August 2009 CS5229 Semester 1 2009/10 57 57
  58. 58. new ack:" if (cwnd < ssthresh)" cwnd += 1" else" cwnd += 1/cwnd 21 August 2009 CS5229 Semester 1 2009/10 58 58
  59. 59. timeout/3rd dup ack:" retransmit all unacked" ssthresh = cwnd/2" cwnd = 1" 21 August 2009 CS5229 Semester 1 2009/10 59 59
  60. 60. Improving TCP Tahoe:" Packets still getting through in dup ack -- no need to reset the clock! 21 August 2009 CS5229 Semester 1 2009/10 60 60
  61. 61. TCP Reno 21 August 2009 CS5229 Semester 1 2009/10 61 61
  62. 62. W t send W/2 during this time t + RTT cwnd = W/2 21 August 2009 CS5229 Semester 1 2009/10 62 62
  63. 63. 21 August 2009 CS5229 Semester 1 2009/10 63 63
  64. 64. 3rd dup ack:" retransmit 1st unacked" ssthresh = cwnd/2" cwnd = cwnd/2 + 3 21 August 2009 CS5229 Semester 1 2009/10 64 64
  65. 65. subsequent dup ack:" cwnd++" new ack:! cwnd = ssthresh 21 August 2009 CS5229 Semester 1 2009/10 65 65
  66. 66. Suppose U is lost (oldest unacked) and all other packets are not. At time t, cwnd is W, and packets [U, U+W-1] are in the pipe. U U+W-1 … 21 August 2009 CS5229 Semester 1 2009/10 66 66
  67. 67. Between time t and t+RTT, we would have retransmitted U and received W-1 duplicate ACK. U U+W-1 … 21 August 2009 CS5229 Semester 1 2009/10 67 67
  68. 68. Between time t and t+RTT, the cwnd becomes W/2 + W-1. So we get to send W/2 new packets during the time. (Soon cwnd is going to become W/2 anyway..) U U+W-1 U+W/2+W-1 … 21 August 2009 CS5229 Semester 1 2009/10 68 68
  69. 69. At time t+RTT, we receive ACK for packets [U,U+W-1], set cwnd to W/2. U U+W-1 U+W/2+W-1 … 21 August 2009 CS5229 Semester 1 2009/10 69 69
  70. 70. 21 August 2009 CS5229 Semester 1 2009/10 70 70
  71. 71. timeout:" retransmit all unacked" ssthresh = cwnd/2" cwnd = 1" 21 August 2009 CS5229 Semester 1 2009/10 71 71
  72. 72. 3rd duplicate ACK:! fast retransmission! (ie, retransmit 1st unack) " fast recovery" (details in Week 4)" ssthresh = cwnd = cwnd/2 21 August 2009 CS5229 Semester 1 2009/10 72 72
  73. 73. Reno cwnd 14 Tahoe cwnd 12 ssthresh 10 8 6 4 2 0 21 August 2009 CS5229 Semester 1 2009/10 73 73
  74. 74. AIMD! additive increase! multiplicative decrease 21 August 2009 CS5229 Semester 1 2009/10 74 74
  75. 75. Fast Recovery: ! the pipe is still almost full -- no need to restart 21 August 2009 CS5229 Semester 1 2009/10 75 75
  76. 76. new ack:" if (cwnd < sstresh)" cwnd += 1" else" cwnd += 1/cwnd 21 August 2009 CS5229 Semester 1 2009/10 76 76
  77. 77. timeout:" retransmit 1st unacked" ssthresh = cwnd/2" cwnd = 1" 21 August 2009 CS5229 Semester 1 2009/10 77 77
  78. 78. 3rd dup ack:" retransmit 1st unacked" ssthresh = cwnd/2" cwnd = cwnd/2 + 3 21 August 2009 CS5229 Semester 1 2009/10 78 78
  79. 79. subsequent dup ack:" cwnd++" new ack:! cwnd = ssthresh 21 August 2009 CS5229 Semester 1 2009/10 79 79
  80. 80. Chiu and Jain, “Analysis of Increase and Decrease Algorithms for Congestion Avoidance in Computer Networks”, Comp. Net. & ISDN Sys. 1989 21 August 2009 CS5229 Semester 1 2009/10 80 80

×