1 Queue Scheduling Analysis The Computer Communication Lab (236340) - Winter 2004 Tanya Berezner Ana Gluzband Gitit 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 Robin In 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 Robin Each 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
7 Partial Class diagram – cont.
8
9 Classes Class 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 numberlengthToSArrival 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 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 Class WFQgateway This class inherits public from class: gateway Class ODRRgateway This class inherits public from class: gateway 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 Length distribution Packets length Length distribution Packets length Length distribution 20 Packets length Length distribution 20 Packets length Length distribution ToS123 distribution3433 ToS123 distribution3433 ToS123 distribution3433 ToS123 distribution ToS123 distribution203050
22 Packets length Length distribution ToS123 distribution3433
23 Packets length Length distribution ToS123 distribution3433
24 Packets length Length distribution ToS123 distribution3433
25 Packets length Length distribution ToS123 distribution3433
26 Packets length Length distribution ToS123 distribution3433
27 Packets length Length distribution ToS123 distribution3433
28 Packets length Length distribution ToS123 distribution3433
29 Packets length Length distribution ToS123 distribution3433
30 Packets length Length distribution ToS123 distribution3433
31 Packets length Length distribution ToS123 distribution3433
32 Packets length Length distribution ToS123 distribution3433
Packets length Length distribution ToS123 distribution3433
34 Packets length Length distribution ToS123 distribution3433
35 Packets length Length distribution ToS123 distribution3433
36 Packets length Length distribution ToS123 distribution3433
37 Packets length Length distribution ToS123 distribution3433
38 Packets length Length distribution ToS123 distribution3433
39 Packets length Length distribution ToS123 distribution3433
40 Packets length Length distribution ToS123 distribution3433
41 Packets length Length distribution ToS123 distribution3433
42 Packets length Length distribution ToS123 distribution3433
43 Packets length Length distribution ToS123 distribution503020
44 Packets length Length distribution ToS123 distribution503020
45 Packets length Length distribution ToS123 distribution503020
46 Packets length Length distribution ToS123 distribution503020
47 Packets length Length distribution ToS123 distribution503020
48 Packets length Length distribution ToS123 distribution503020
49 Packets length Length distribution ToS123 distribution503020
50 Packets length Length distribution ToS123 distribution203050
51 Packets length Length distribution ToS123 distribution203050
52 Packets length Length distribution ToS123 distribution203050
53 Packets length Length distribution ToS123 distribution203050
54 Packets length Length distribution ToS123 distribution203050
55 Packets length Length distribution ToS123 distribution203050
56 Packets length Length distribution ToS123 distribution203050
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 interleaving for distribution with more big packets.