Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

SP Queue Principle

When the scheduler mode is SP, the egress port has eight queues: 7, 6, 5, 4, 3, 2, 1, and 0, queue 7 being the highest priority and queue 0 being the lowest priority. The advantage is that it can give priority to the transmissions of a key business group. This scheduler mode also has disadvantages. During times of congested conditions, if higher the priority queue has groups for a long time, the low priority queues will not get service all the time.

WRR Principle

The full name of WRR is Weighted Round Robin. In order to ensure that every queue has certain servicing time, WRR uses a round robin scheduling algorithm between the queues. When the scheduler mode is WRR, every queue can have a weighted value, which is also known as scheduling weight. Scheduling weight means that when the egress port schedules, the queue messages the proportion of scheduling resources to be used. Scheduling unit is Kbps.The example of a WRR scheduling algorithm is as follows:

On the 1000 Mbps egress port, the scheduling weights of eight queues are 5, 4, 3, 3, 2, 1, 1, 1; this ensures that even the lowest priority queue gets bandwidth.

The calculation method is as follows: 

1/(5+4+3+3+2+1+1+1)*1000 Mbps=50 Mbps. 

This can avoid the problem of the packets in the lower priority queues not getting service for a long time. The advantage is that although the queue scheduling uses round robin scheduling, every queue does not distribute at a fixed service time—if a queue is empty, the next queue should be scheduled immediately. In this way, it makes full use of bandwidth resources. When using WRR scheduling mode, user can define the weighted value for each queue.


WFQ Principle

The full name of WFQ is Weighted Fair Queuing. It is similar to WRR. The only difference between WFQ and WRR is that the scheduling mode in WFQ supports a minimum bandwidth guarantee, making this scheduling scheme more flexible. Configuring a minimum guaranteed bandwidth assures that every queue working in WFQ mode has a minimum bandwidth guarantee. In addition, the bandwidth available for distribution allocates according to the weighted proportion in the corresponding queue.

The distributable bandwidth calculation method is as follows:

distributable bandwidth = total bandwidth - minimum bandwidth

The example of the WFQ scheduling algorithm as follows:

Assuming that the total bandwidth of the egress port is 100M, there are 3 flows in the queue of this port.

Their scheduling weighted values are 1,2,4; the minimum bandwidth guarantees of these 3 flows are 10000Kbps,10000Kbps, and 20000Kbps.

Proportions of each flow are 10%,10%, 20%.

Distributable bandwidth = 100M-(10M+10M+20M)=60M.

Proportion of distributable bandwidth is 60%

Total distributable bandwidth = the sum of each flow weighted value.

In this example, the total distributable bandwidth is 7(that is 1+2+4).

Formula to calculate the proportion of distributable bandwidth which is occupied by each flow is as follows:

Proportion of distributable bandwidth = (the own weight of flow)/( distributable bandwidth).

Proportions of the distributable bandwidth for each flow are 1/7, 2/7, 4/7.

Bandwidth ratio of the flows is (10%+60%*(1/7)) : (10%+60%*(2/7)) : (20%+60%*(4/7)),that is 13:19:38.

  • No labels