OcNOS SP : Quality of Service Guide : Quality of Service Configuration : Scheduling
Scheduling
Qumran can process all traffic if it is within the capacity of the device and all traffic will be forwarded as received. When the device reaches bandwidth constraint stage, traffic becomes subject to drop as described in Configuring Packet Drop Probability Using WRED or traffic scheduling as described in this section. Qumran classifies packets into one of eight internal priorities. Traffic scheduling allows to selectively forward traffic according to the forwarding queue that is mapped according to one of the following algorithm:
Strict priority-based scheduling – This scheduling ensures the higher priority traffic is serviced ahead of lower priority traffic. As a result lower priority traffic may suffer from any access.
WFQ (Weighted Fair Queuing) weight-based scheduling – In this scheduling, some weight based bandwidth is allocated to all queues. In this scheduling, egress traffic will be served based on the configured weight distribution.
Mixed strict and weight based scheduling – This scheduling provides a mixture of strict priority for the higher priority queues and WFQ for the remaining priority queues. In this scheduling, strict priority should always be configured from highest to lower priority queues in sequential order and WFQ scheduling should be configured from lowest priority queues to higher priority queues in sequential order.
Configuring traffic scheduling
Traffic scheduling can be configured on a per port basis. It affects the outgoing traffic when bandwidth constraints occur. In Qumran device, all the eight queues of ports will be configured with strict priority scheduling by default when QoS feature is enabled. Strict priority level will correspond to the queue number.
Scheduling algorithms are configurable per priority queues using queuing policy-map infrastructure. The following section describes how to configure different types of scheduling:
Configuring strict priority based traffic scheduling
Calculating the values for WFQ Weight based traffic scheduling
Configuring WFQ weight based traffic scheduling
Configuring mixed strict priority and weight based scheduling
Configuring Strict Priority Based Traffic Scheduling
Qumran supports strict priority algorithm with 8 levels from 0 to 7. When QoS feature is enabled, all 8 default queues will be initialized with strict priority scheduling with level corresponding to queue number. Strict priority scheduling is configurable using the priority command on the default queuing class-maps in a queuing policy-map. Configuration takes effect when the queuing policy-map is bound to the egress interface. By default, all interfaces are configured with “default-out-policy” when QoS feature is enabled.
Below, is the command to configure strict priority based scheduling:
priority level <0-7>
An example of configuring “strict priority” is shown below:
(config)#policy-map type queuing default pq7-strict
(config-pmap-que-def)#class type queuing default q7
(config-pmap-c-que-def)#priority level 6
(config-pmap-c-que-def)#exit
Queues set with higher priority value will have higher priority. If more than one queue is set with strict priority scheduling with same level value, then there will be fair queuing between those queues
Default scheduling algorithm in Qumran device is WFQ weight based traffic scheduling with weight 1. Therefore, when strict priority configuration is removed, scheduling algorithm on that queue will be reset to WFQ with default weight 1.
Calculating the Values for WFQ Weight Based Traffic Scheduling
Weighted Fair Queueing (WFQ) scheduling weight is calculated as a percentage of the port's total bandwidth using the formula:
Bandwidth percentage of Q(x) = Total bandwidth of port * weight percentage of Q(x)
Where:
WQ(x) is the value of the priority queue for which weight is to be determined.
WQ0-WQ7 is the assigned weight values of the eight queues – for example, if the weight values q0 to q7 are assigned as 3, 10, 5, 7, 18, 4, 9 and 1, then the Weight value of q4 can be calculated using the formula:
The weight of q4 is 31.6%. Q4 will get 31.6% of the port's total bandwidth.
Note: Due to a difference in hardware rate set values, a deviation of (<4%) is expected.
The example below explains how to derive weights based on bandwidth requirement on queues.
If the bandwidth requirement of Q0 is 5%, Q1 is 10%, Q2 is 10%, Q3 is 15% and remaining bandwidth for Q4, Q5, Q6 and Q7, then the weight for individual queue can be computed as:
Q0: 5, Q1: 10, Q2: 10, Q3: 15, Q4-Q7: (100 - 5 - 10 - 10 - 15) = 60
Equally dividing weight 60 among 4 queues will result in a weight of 15 per queue. So, the weights will be:
Q0: 5, Q1: 10, Q2: 10, Q3: 15, Q4: 15, Q5: 15, Q6: 15, Q7: 15
In this case, weight values can be simplified by dividing them with common denominator 5. So, the final set of weight values for q0 to q7 will be derived to be 1, 2, 3, 3, 3, 3, 3 and 3.
Configuring WFQ Weight Based Traffic Scheduling
Set the WFQ weight based scheduling with the following configuration:
(config)#policy-map type queuing default pq0-3-wfq
(config-pmap-que-def)#class type queuing default q0
(config-pmap-c-que-def)# wfq-queue weight 16
(config-pmap-c-que-def)#exit
where:
wfq-queue weight <1-127>
Weight values can be configured in the range of 1 to 127.
Configuring Mixed Strict Priority and Weight Based Traffic Scheduling
Qumran device supports mixed scheduling option where strict priority with same or different level values can be configured on few queues along with WFQ algorithm with same or different weights configured on other default queues. Queues configured with strict priority scheduling will have a higher weight over the queues with WFQ scheduling.
An example configuration is shown below:
(config)#policy-map type queuing default pq-mixed
(config-pmap-que-def)#class type queuing default q0
(config-pmap-c-que-def)# wfq-queue weight 4
(config-pmap-c-que-def)#exit
(config-pmap-que-def)#class type queuing default q1
(config-pmap-c-que-def)#priority level 3
(config-pmap-c-que-def)#exit
(config-pmap-que-def)#class type queuing default q2
(config-pmap-c-que-def)# wfq-queue weight 10
(config-pmap-c-que-def)#exit
(config-pmap-que-def)#class type queuing default q3
(config-pmap-c-que-def)#priority level 4
(config-pmap-c-que-def)#exit
(config-pmap-que-def)#class type queuing default q4
(config-pmap-c-que-def)# wfq-queue weight 30
(config-pmap-c-que-def)#exit
Classes 5 to 7 will be strict priority with corresponding level if these classes were not altered.
Follow Chapter 12, Configuring Egress Queues on Ports for complete configuration details of queuing property configuration.
Scheduling may be affected by resource exhaustion in case of multicast traffic.
Resource exhausted can be verified through drop reason as “RESOURCE_ERROR_STATUS.”
Queue Drop Counters Verification
Drop counters with drop reasons can be verified globally using the command:
#show hardware-discard-counters
+----------------------------------+--------+--------+
| Registers | Core 0 | Core 1 |
+----------------------------------+--------+--------+
IQM_QUEUE_ENQ_DISCARDED_PACKET_COUNTER 1596100
Reason: RESOURCE_ERROR_STATUS Y
VOQ_MX_QSZ_STATUS Y
EGQ_PQP_DISCARD_UNICAST_PACKET_COUNTER 59807
Reason: SRC_EQUAL_DEST_INT Y