Lecture 5: RED

67
1 11 September 2009 CS5229, Semester 1 2009/10 Sally Floyd and Van Jacobson Random Early Detection Gateway for Congestion Avoidance TON, 1993

description

 

Transcript of Lecture 5: RED

Page 1: Lecture 5: RED

1 11 September 2009 CS5229, Semester 1 2009/10

Sally Floyd and Van Jacobson “Random Early Detection Gateway for Congestion

Avoidance” "TON, 1993

Page 2: Lecture 5: RED

2 11 September 2009 CS5229, Semester 1 2009/10

Router’s "Queue Management

Page 3: Lecture 5: RED

3 11 September 2009 CS5229, Semester 1 2009/10

Manages sharing of "(i) buffer space"(ii) bandwidth

Page 4: Lecture 5: RED

4 11 September 2009 CS5229, Semester 1 2009/10

Q1: Which packet to drop "(and when to drop) ?

Page 5: Lecture 5: RED

5 11 September 2009 CS5229, Semester 1 2009/10

Q2: Which packet to send next?

Page 6: Lecture 5: RED

6 11 September 2009 CS5229, Semester 1 2009/10

FIFO + Drop Tail

Page 7: Lecture 5: RED

7 11 September 2009 CS5229, Semester 1 2009/10

Keep a single queue

Page 8: Lecture 5: RED

8 11 September 2009 CS5229, Semester 1 2009/10

Drop what/when? "Drop arriving packets "

when queue is full

Page 9: Lecture 5: RED

9 11 September 2009 CS5229, Semester 1 2009/10

Send what? "Send the packet at "

head of queue

Page 10: Lecture 5: RED

10 11 September 2009 CS5229, Semester 1 2009/10

Round Robin

Page 11: Lecture 5: RED

11 11 September 2009 CS5229, Semester 1 2009/10

One queue per flow

Page 12: Lecture 5: RED

12 11 September 2009 CS5229, Semester 1 2009/10

Drop what/when? !Drop arriving packets from "flow i when queue i is full

Page 13: Lecture 5: RED

13 11 September 2009 CS5229, Semester 1 2009/10

Send what? "Each flow takes turn -- send the

packet at the head of the queues in a round robin manner.

Page 14: Lecture 5: RED

14 11 September 2009 CS5229, Semester 1 2009/10

Advantages of "FIFO and Drop Tail

Page 15: Lecture 5: RED

15 11 September 2009 CS5229, Semester 1 2009/10

Simple to implement

Page 16: Lecture 5: RED

16 11 September 2009 CS5229, Semester 1 2009/10

Scale well"(no per-connection states)

Page 17: Lecture 5: RED

17 11 September 2009 CS5229, Semester 1 2009/10

Reduce delay for a bursty connection"(e.g. VoIP)

Page 18: Lecture 5: RED

18 11 September 2009 CS5229, Semester 1 2009/10

Problems with "FIFO and Drop Tail

Page 19: Lecture 5: RED

19 11 September 2009 CS5229, Semester 1 2009/10

Problem 1!Bias against bursty traffic"

burstiness increases chances that the queue will overflow

Page 20: Lecture 5: RED

20 11 September 2009 CS5229, Semester 1 2009/10

Problem 2!Global synchronization"

connections reduce their windows simultaneously, lowering utilization.

Page 21: Lecture 5: RED

21 11 September 2009 CS5229, Semester 1 2009/10

Problem 3!Queue size"

higher bandwidth needs longer "queue, increasing delay. "

TCP tries to keep the queue full.

Page 22: Lecture 5: RED

22 11 September 2009 CS5229, Semester 1 2009/10

Problem 4!No isolation against "unresponsive flows

Page 23: Lecture 5: RED

23 11 September 2009 CS5229, Semester 1 2009/10

Random Drop

Page 24: Lecture 5: RED

24 11 September 2009 CS5229, Semester 1 2009/10

Keep a single queue

Page 25: Lecture 5: RED

25 11 September 2009 CS5229, Semester 1 2009/10

Drop what/when? "Drop random packet in the queue "

when queue is full

Page 26: Lecture 5: RED

26 11 September 2009 CS5229, Semester 1 2009/10

Send what? "Send the packet at "

head of queue

Page 27: Lecture 5: RED

27 11 September 2009 CS5229, Semester 1 2009/10

No bias against bursty traffic -- "bursty arrival causes random packets to be dropped.

Page 28: Lecture 5: RED

28 11 September 2009 CS5229, Semester 1 2009/10

Flows with higher rate occupy more buffer spaces, have higher chance to be dropped.

Page 29: Lecture 5: RED

29 11 September 2009 CS5229, Semester 1 2009/10

Signal flows that is congesting the network to slow down.

Page 30: Lecture 5: RED

30 11 September 2009 CS5229, Semester 1 2009/10

Random drop recovers from congestion (full queue) by dropping packets.

Page 31: Lecture 5: RED

31 11 September 2009 CS5229, Semester 1 2009/10

Early Random Drop

Page 32: Lecture 5: RED

32 11 September 2009 CS5229, Semester 1 2009/10

Drop what/when? "Drop arriving packet randomly when queue is longer than a

threshold

Page 33: Lecture 5: RED

33 11 September 2009 CS5229, Semester 1 2009/10

Early random drop avoids congestion (full queue) by dropping packets before queue is full.

Page 34: Lecture 5: RED

34 11 September 2009 CS5229, Semester 1 2009/10

RED"Random Early Detection

Page 35: Lecture 5: RED

35 11 September 2009 CS5229, Semester 1 2009/10

Drop what/when? !Drop arriving packet randomly when average queue length "

is above a threshold

Page 36: Lecture 5: RED

36 11 September 2009 CS5229, Semester 1 2009/10

Differences: Use average queue length instead of instantaneous

length to absorb transient congestion.

Page 37: Lecture 5: RED

37 11 September 2009 CS5229, Semester 1 2009/10

Differences: Dropping probability changes dynamically depending

on queue length.

Page 38: Lecture 5: RED

38 11 September 2009 CS5229, Semester 1 2009/10

1

Dropping Probability

Average Queue Length

Page 39: Lecture 5: RED

39 11 September 2009 CS5229, Semester 1 2009/10

foreach incoming packet X" calc average queue length" if minth < average < maxth"

calc p " drop X with probability p" else if average > maxth"

drop X

Page 40: Lecture 5: RED

40 11 September 2009 CS5229, Semester 1 2009/10

(Instead of dropping packets, we can also mark a packet to indicate congestion)

Page 41: Lecture 5: RED

41 11 September 2009 CS5229, Semester 1 2009/10

How to calculate average queue length?"

How to calculate drop probability?"

How to set thresholds?

Page 42: Lecture 5: RED

42 11 September 2009 CS5229, Semester 1 2009/10

We can use exponentially weighted average. On every packet arrival:

Page 43: Lecture 5: RED

43 11 September 2009 CS5229, Semester 1 2009/10

Large wq : A burst of packets will cause avg to increase too fast, hit the max threshold"

Small wq : avg increases too slowly and we are unable to detect initial stage of congestions.

Page 44: Lecture 5: RED

44 11 September 2009 CS5229, Semester 1 2009/10

Page 45: Lecture 5: RED

45 11 September 2009 CS5229, Semester 1 2009/10

Page 46: Lecture 5: RED

46 11 September 2009 CS5229, Semester 1 2009/10

We can use exponentially weighted average. On every packet arrival:

Page 47: Lecture 5: RED

47 11 September 2009 CS5229, Semester 1 2009/10

What if q drops to zero and no packet arrives?

m is a function of period when queue is empty

Page 48: Lecture 5: RED

48 11 September 2009 CS5229, Semester 1 2009/10

How to calculate average queue length?"

How to calculate drop probability"

How to set thresholds?

Page 49: Lecture 5: RED

49 11 September 2009 CS5229, Semester 1 2009/10

1

Dropping Probability

Average Queue Length

pmax

minth maxth

Page 50: Lecture 5: RED

50 11 September 2009 CS5229, Semester 1 2009/10

Page 51: Lecture 5: RED

51 11 September 2009 CS5229, Semester 1 2009/10

Page 52: Lecture 5: RED

52 11 September 2009 CS5229, Semester 1 2009/10

How to calculate average queue length?"

How to calculate drop probability?"

How to set thresholds?

Page 53: Lecture 5: RED

53 11 September 2009 CS5229, Semester 1 2009/10

maxth - minth should be sufficiently"large otherwise average queue size can oscillate beyond maxth"

“need more research” for optimal value.

Page 54: Lecture 5: RED

54 11 September 2009 CS5229, Semester 1 2009/10

Advantages of RED

Page 55: Lecture 5: RED

55 11 September 2009 CS5229, Semester 1 2009/10

No bias against bursty flows"Less global synchronization"

Control average queue length

Page 56: Lecture 5: RED

56 11 September 2009 CS5229, Semester 1 2009/10

RED does not deal with unresponsive flows

Page 57: Lecture 5: RED

57 11 September 2009 CS5229, Semester 1 2009/10

ns-2 demo

Page 58: Lecture 5: RED

58 11 September 2009 CS5229, Semester 1 2009/10

Variations of RED

Page 59: Lecture 5: RED

59 11 September 2009 CS5229, Semester 1 2009/10

RED biases against flow with small packet size

Page 60: Lecture 5: RED

60 11 September 2009 CS5229, Semester 1 2009/10

We can fix this by weighting drop probability to packet size

Page 61: Lecture 5: RED

61 11 September 2009 CS5229, Semester 1 2009/10

A router can keep one queue per flow and apply RED to each one.

Page 62: Lecture 5: RED

62 11 September 2009 CS5229, Semester 1 2009/10

Drop probability can be weighted with the priority of the flow.

Page 63: Lecture 5: RED

63 11 September 2009 CS5229, Semester 1 2009/10

This is known as WRED and is implemented in some Cisco routers.

Page 64: Lecture 5: RED

64 11 September 2009 CS5229, Semester 1 2009/10

Simulation"Results

Page 65: Lecture 5: RED

65 11 September 2009 CS5229, Semester 1 2009/10

Four TCP flows starting at time 0.2, 0.4, 0.6 and 0.8

Page 66: Lecture 5: RED

66 11 September 2009 CS5229, Semester 1 2009/10

Page 67: Lecture 5: RED

67 11 September 2009 CS5229, Semester 1 2009/10

Conclusion:"RED increases throughput, reduces delay, controls average queue sizes, reduces global sync, and is fairer to bursty traffic. It is deployed in routers today."

But careful tuning of parameters is needed.