1 Queue Scheduling Analysis The Computer Communication Lab (236340) - Winter 2004 Tanya Berezner Ana...

58
1 Queue Scheduling Analysis The Computer Communication Lab (236340) - Winter 2004 Tanya Berezner Ana Gluzband Gitit Amihud
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of 1 Queue Scheduling Analysis The Computer Communication Lab (236340) - Winter 2004 Tanya Berezner Ana...

1

Queue Scheduling Analysis

The Computer Communication Lab (236340) - Winter 2004

Tanya BereznerAna GluzbandGitit Amihud

2

Introduction General network node (gateway) receives packets.

The packets are queued according to their ToS. The order of the transmission is determined by the specified scheduling algorithm.

The project includes: Simulation of a gateway that receives IP packets that distributed

according to the user specifications. Implementation of the following queuing scheduling algorithms:

WFQ ,DRR, and ODRR. Analysis of the algorithm’s performance.

3

The algorithms:

DRR – Deficit Round RobinIn this algorithm there is round robin between the non-empty queues. Each queue gets a quantum (according to it’s Tos) to transmit it’s packets. If the queue didn’t use all it’s quantum, the deficit quantum is saved for the next iterations.

WFQ – Weighted Fair Queuing In this algorithm each queue gets a part of the bandwidth, according to his Tos.We calculate the virtual finish time for transmission for each packet according to it’s ToS bandwidth, the number of active queues and the packet length. The next packet to dequeue will be the one with the smallest virtual finish time.

4

ODRR – Ordered Deficit Round RobinEach queue gets a number of units. The allocated units quantity is in accordance to the priority of the queue (high priority – more units – more bandwidth). The user sets an order between the queues (qOrderList). The qOrderList composed of the queues' number and their units quantum. the packets are drawn from the queues according to the qOrderList.

The deficit quantum is accomulated for each queue as in DRR. If the next packet chosen for transmission according to the

qOrderList doesn’t fit in the slot, the algorithm tries to find another packet in another queue head that fits the slot, and accomulated quantum for all skipped queues.

There is a "saving" mechanism that puts a queue that has accumulated too much quantum in the PassLimitList. In the beginning of each slot, the queues in PassLimitList will transmit first.

The algorithms: cont.

5

6

Partial Class diagram

Generator

int Len[NUM_OF_LEN];double LenPercent[NUM_OF_LEN];int TosNumdouble TosPercent[MAX_NUM_OF_TOS];CString fileName

Generate()CreateIpFile()

7

DRRGateway

double DeficitCounter[MAX_NUM_OF_TOS];int currentQueue

enqueue()dequeue()long nextPacketLen()DRRgateway()

WFQGateway

int PercentWeights[MAX_NUM_OF_TOS];bool activeQueues[MAX_NUM_OF_TOS];double queueFinishTime[MAX_NUM_OF_TOS];int bandwidthOfActivedouble systemTime

enqueue()dequeue()long nextPacketLen()WFQgateway()

ODRRGateway

int units[MAX_NUM_OF_TOS];int DeficitCounter[MAX_NUM_OF_TOS]int currentQueueint deficitLimitlist<Pair> OrderList

enqueue()dequeue()long nextPacketLen()ODRRgateway()

Stat

ofstream dFileofstream tFileofstream lFile

Stat()void update()void printStat()

gateway<class T>

queue<T>* queuesint slotSize;double totalBandwidthdouble slotTimedouble time

gateway()run()bool getNextIpPacket()virtual enqueue()virtual dequeue()virtual long nextPacketLen()

Partial Class diagram – cont.

8

Partial Class diagram – cont.IPpack

int toslong lenlong timelong num

IPpack()

DRRIpPack

DRRIpPack()WFQIpPack

double finishTime

WFQIpPack()

ODRRIpPack

ODRRIpPack()

9

ClassesClass Generate:

This class receives from the user the following parameter: Lamda – the mean value of the exponential distribution of arriving

packets. Lengths of packets. Lengths distribution. ToS distribution. Input file name of the generated file.

The class generates a file containing IP packets in the following format:

Lamda Number of different ToSes

Serial number length ToS Arrival timeSerial number length ToS Arrival time…

We also allow the user to supply an existing file of IP packets. The IP packets in this file should be in the above format.

10

template<class T> gateway An abstract template class that represent the gateway.

This class holds our “database”: a template array of queues. Each ToS has it’s own queue.

This class implements the run() method. This method manages the time and the slots. It synchronizes the enqueue() and dequeue() methods.

This class declares 3 pure virtual functions that derived classes should implement according to the algorithm:

virtual enqueue() = 0; virtual dequeue() = 0; virtual long nextPacketLen() = 0;

Classes – cont.

11

class IPpack This class represents a basic IP packet and contains the

following fields: ToS Length Arrival time Serial number in the file.

The following 3 classes inherit from this class : Class DRRIpPack Class WFQIpPack Class ODRRIpPack

The derived classes add member data according to the specific algorithm: for example class WFQIpPack adds data member finishTime that represent the virtual finish time.

Classes – cont.

12

Class DRRgateway This class inherits public from class: gateway<DRRIpPack>

Class WFQgateway This class inherits public from class: gateway<WFQIpPack>

Class ODRRgateway This class inherits public from class: gateway<ODRRIpPack>

All the three classes implement the 3 virtual methods (enqueue(), dequeue(), nextPacketLen()) that were declared in their base class according to their algorithms.

Classes – cont.

13

14

GUI

15

GUI - cont

16

GUI - cont

17

GUI - cont

18

GUI - cont

19

20

The constant parameters:

Length sizes = 5,10,15,20,25 Queue limit = 1000 bits ToS weights in percents = 50,30,20 Total bandwidth = 100 Slot size = 100 Proportion for DRR = 1 Deficit limit = 30 Unit =5 bits Number of generated packets = 10,000

21

We analyzed the following packets distributions:

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 3

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 50

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 20

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 20

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

2.

3.

4.

5.

ToS 1 2 3

distribution 34 33 33

ToS 1 2 3

distribution 34 33 33

ToS 1 2 3

distribution 34 33 33

ToS 1 2 3

distribution 50 30 20

ToS 1 2 3

distribution 20 30 50

22

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

ToS 1 2 3

distribution 34 33 33

DRR - delay

0

10

20

30

40

50

60

Load

Del

ay (s

ec)

ToS1

ToS2

ToS3

23

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

ToS 1 2 3

distribution 34 33 33

WFQ - delay

0

50

100

150

200

Load

Del

ay (s

ec) ToS1

ToS2

ToS3

24

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

ToS 1 2 3

distribution 34 33 33

ODRR default order - delay

0

10

20

30

40

50

60

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

25

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

ToS 1 2 3

distribution 34 33 33

ODRR interleaved - delay

0

10

20

30

40

50

60

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

26

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

ToS 1 2 3

distribution 34 33 33

THROUGHPUT

0

0.2

0.4

0.6

0.8

1

0.08

0.23

0.38

0.53

0.68

0.83

0.98

1.13

1.28

1.43

1.58

1.73

Load

Thro

ughp

ut

DRR

WFQ

ODRR

ODRR default

27

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

ToS 1 2 3

distribution 34 33 33

THROUGHPUT ZOOM

0.89

0.9

0.91

0.92

0.93

0.94

0.95

0.96

0.98

1.05

1.13 1.2

1.28

1.35

1.43 1.5

1.58

1.65

1.73 1.8

Load

Th

rou

gh

pu

t DRR

WFQ

ODRR

ODRR default

28

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 201.

ToS 1 2 3

distribution 34 33 33

Lost packets for ToS1

0100200300400500600700

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

lost

pac

kets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS2

0

500

1000

1500

2000

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

lost

pac

kets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS3

0

500

1000

1500

2000

2500

3000

Load

lost

packets DRR

WFQ

ODRR

ODRR default

29

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 32.

ToS 1 2 3

distribution 34 33 33

DRR - delay

0

10

20

30

40

50

0.05

0.14

0.23

0.32

0.41 0.5

0.59

0.69

0.78

0.87

0.96

1.05

1.14

1.24

1.33

Load

del

ay (

sec) ToS1

ToS2

ToS3

30

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 32.

ToS 1 2 3

distribution 34 33 33

WFQ - delay

0

20

40

60

80

100

0.04

575

0.18

3

0.32

025

0.45

75

0.59

475

0.73

2

0.86

925

1.00

65

1.14

375

1.28

1

Load

del

ay (

sec) ToS1

ToS2

ToS3

31

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 32.

ToS 1 2 3

distribution 34 33 33

ODRR default order - delay

0

10

20

30

40

50

0.05

0.14

0.23

0.32

0.41 0.5

0.59

0.69

0.78

0.87

0.96

1.05

1.14

1.24

1.33

Load

del

ay (

sec) ToS1

ToS2

ToS3

32

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 32.

ToS 1 2 3

distribution 34 33 33

ODRR interleaved - delay

0

10

20

30

40

50

0.05

0.14

0.23

0.32

0.41 0.5

0.59

0.69

0.78

0.87

0.96

1.05

1.14

1.24

1.33

Load

del

ay (

sec) ToS1

ToS2

ToS3

33

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 32.

ToS 1 2 3

distribution 34 33 33

Througput

0

0.2

0.4

0.6

0.8

1

1.2

0.04

575

0.18

3

0.32

025

0.45

75

0.59

475

0.73

2

0.86

925

1.00

65

1.14

375

1.28

1

Load

Th

rou

gp

ut DRR

WFQ

ODRR default

ODRR interleaved

34

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 32.

ToS 1 2 3

distribution 34 33 33

Throughput - zoom

0.9

0.91

0.92

0.93

0.94

0.95

0.96

0.97

0.92

0.96

1.01

1.05 1.1

1.14

1.19

1.24

1.28

1.33

Load

Th

rou

gh

pu

t DRR

WFQ

ODRR default

ODRR interleaved

35

Packets length 5 10 15 20 25

Length distribution

50 30 10 7 32.

ToS 1 2 3

distribution 34 33 33

Lost packets for ToS2

0100200300400500600700800

Load

lost

pac

kets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS3

0

500

1000

1500

2000

2500

Loadlo

st p

acke

ts DRR

WFQ

ODRR

ODRR default

36

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 503.

ToS 1 2 3

distribution 34 33 33

DRR - delay

010

203040

5060

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

37

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 503.

ToS 1 2 3

distribution 34 33 33

WFQ - delay

0

50

100

150

200

250

0.10

43

0.31

28

0.52

13

0.72

98

0.93

83

1.14

68

1.35

53

1.56

38

1.77

23

1.98

08

2.18

93

2.39

78

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

38

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 503.

ToS 1 2 3

distribution 34 33 33

ODRR default order - delay

010

203040

5060

0.10

43

0.31

28

0.52

13

0.72

98

0.93

83

1.14

68

1.35

53

1.56

38

1.77

23

1.98

08

2.18

93

2.39

78

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

39

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 503.

ToS 1 2 3

distribution 34 33 33

ODRR interleaved - delay

010

203040

5060

0.10

43

0.31

28

0.52

13

0.72

98

0.93

83

1.14

68

1.35

53

1.56

38

1.77

23

1.98

08

2.18

93

2.39

78

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

40

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 503.

ToS 1 2 3

distribution 34 33 33

THROUGHPUT

0

0.2

0.4

0.6

0.8

1

0.1

0.3

1

0.5

2

0.7

3

0.9

4

1.1

5

1.3

6

1.5

6

1.7

7

1.9

8

2.1

9

2.4

Load

Th

rou

gh

pu

t DRR

WFQ

ODRR

ODRR default

41

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 503.

ToS 1 2 3

distribution 34 33 33

THROUGHPUT ZOOM

0.8850.89

0.8950.9

0.9050.91

0.9150.92

0.925

1.35

525

1.56

375

1.77

225

1.98

075

2.18

925

2.39

775

Load

Th

rou

gh

pu

t DRR

WFQ

ODRR

ODRR default

42

Packets length 5 10 15 20 25

Length distribution

3 7 10 30 503.

ToS 1 2 3

distribution 34 33 33

Lost packets for ToS1

0200400600800

1000120014001600

Load

lost

packets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS2

0

500

1000

1500

2000

2500

3000

3500

1.0

4

1.2

5

1.4

6

1.6

7

1.8

8

2.0

9

2.2

9

2.5

Load

lost

packets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS3

0500

100015002000250030003500

0.93

83

1.14

68

1.35

53

1.56

38

1.77

23

1.98

08

2.18

93

2.39

78

Load

lost

pa

cke

ts DRR

WFQ

ODRR

ODRR default

43

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 204.

ToS 1 2 3

distribution 50 30 20

DRR - delay

0

10

20

30

40

50

60

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

44

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 204.

ToS 1 2 3

distribution 50 30 20

WFQ - delay

0

10

20

30

40

50

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

45

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 204.

ToS 1 2 3

distribution 50 30 20

ODRR default order - delay

0

10

20

30

40

50

60

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

46

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 204.

ToS 1 2 3

distribution 50 30 20

ODRR interleaved - delay

0

10

20

30

40

50

60

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

47

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 204.

ToS 1 2 3

distribution 50 30 20

THROUGHPUT

0

0.2

0.4

0.6

0.8

1

0.0

8

0.2

3

0.3

8

0.5

3

0.6

8

0.8

3

0.9

8

1.1

3

1.2

8

1.4

3

1.5

8

1.7

3Load

Th

rou

gh

pu

t DRR

WFQ

ODRR

ODRR default

48

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 204.

ToS 1 2 3

distribution 50 30 20

THROUGHPUT ZOOM

0.89

0.9

0.91

0.92

0.93

0.94

0.95

0.96

0.98

1.05

1.13 1.2

1.28

1.35

1.43 1.5

1.58

1.65

1.73 1.8

Load

Th

rou

gh

pu

t DRR

WFQ

ODRR

ODRR default

49

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 204.

ToS 1 2 3

distribution 50 30 20

Lost packets for ToS1

0

500

1000

1500

2000

2500

3000

Load

lost

packets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS2

0

500

1000

1500

2000

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

lost

pac

kets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS3

0

200

400

600

800

1000

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

lost

pac

kets DRR

WFQ

ODRR

ODRR default

50

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 205.

ToS 1 2 3

distribution 20 30 50

DRR - delay

0

10

20

30

40

50

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

51

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 205.

ToS 1 2 3

distribution 20 30 50

WFQ - delay

0

50

100

150

200

250

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

52

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 205.

ToS 1 2 3

distribution 20 30 50

ODRR default order - delay

0

10

20

30

40

50

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

53

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 205.

ToS 1 2 3

distribution 20 30 50

ODRR interleaved - delay

0

10

20

30

40

50

0.07

50.

225

0.37

50.

525

0.67

50.

825

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

De

lay

(s

ec

)

ToS1

ToS2

ToS3

54

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 205.

ToS 1 2 3

distribution 20 30 50

THROUGHPUT

0

0.2

0.4

0.6

0.8

1

0.0

8

0.2

3

0.3

8

0.5

3

0.6

8

0.8

3

0.9

8

1.1

3

1.2

8

1.4

3

1.5

8

1.7

3Load

Th

rou

gh

pu

t DRR

WFQ

ODRR

ODRR default

55

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 205.

ToS 1 2 3

distribution 20 30 50

THROUGHPUT ZOOM

0.89

0.9

0.91

0.92

0.93

0.94

0.95

0.98

1.05

1.13 1.2

1.28

1.35

1.43 1.5

1.58

1.65

1.73 1.8

Load

Th

rou

gh

pu

t DRR

WFQ

ODRR

ODRR default

56

Packets length 5 10 15 20 25

Length distribution

20 20 20 20 205.

ToS 1 2 3

distribution 20 30 50

Lost packets for ToS2

0

200

400

600

800

1000

0.97

51.

125

1.27

51.

425

1.57

51.

725

Load

lost

pac

kets DRR

WFQ

ODRR

ODRR default

Lost packets for ToS3

0

1000

2000

3000

4000

5000

Load lo

st p

acke

ts DRR

WFQ

ODRR

ODRR default

57

58

When there are more small packets:Delay is smaller in all algorithms.The throughput reaches it’s maximal values in higher load.There is less lost packets for all algorithms.

When there are more large packets, we observe the opposite tendencies.

The throughput of ODRR is better than the throughput of WFQ and DRR.Possible reason: slot filling mechanism.

WFQ is more sensitive to changes in ToS distribution. A small change in ToS distribution leads to a bigger change in delay and number of lost packets in comparison with the other algorithms.Possible reason: The depart time of the packet in WFQ depends on the queue state on it’s arrival.

For ODRR, the default order is better than interleavingfor distribution with more big packets.