The following algorithms are available in QoS queue scheduling:
1. SP
SP: strict priority (strict priority). SP scheduling sends the group in the higher-priority queue in strict order of priority from high to low. When the higher-priority queue is empty, resend the group in the lower-priority queue. The queue 7 has the highest priority and the queue 0 has the lowest priority.
Packets P1 ~ P11 ~ P... Enter different priority queues according to the classification, and the classification is mapped to the port Queue according to the local priority of the packets. If a packet enters each queue in the way shown in the figure, SP scheduling first schedules messages in the high-priority queue 7, and then enters the next queue 6 after the queue 7 is scheduled, the order after the packets are sent is P1, P2, P3, P4, P5... P11
2. RR (Round Robin)-Cyclic Scheduling
Packet-based fair scheduling (Round Robin) RR, packet-based fair scheduling, each queue is scheduled to one packet, it is transferred to the next queue
Packets P1 ~ P11 ~ P... Enter different priority queues according to the classification, and the classification is mapped to the port Queue according to the local priority of the packets. If the packet enters the queues as shown in the figure, the RR is scheduled, and the queue 7 dispatches a packet to the next queue 6 to schedule a packet, so far, one packet is scheduled in the queue 0, and then one packet is scheduled in the queue 7. If no packet is in the queue, it is directly sent to the next queue. The preceding packet queuing sequence is P1, P4, P7, P10, P2, P5, p8, P11, P3, P6, and P9.
2. SRR:
3. DRR (Deficit Round Robin)-differential cyclic queue
The DRR Algorithm is an extension of the RR algorithm. The DRR algorithm assigns each queue a constant Qn (time slice proportional to the weight) and a variable DN (difference ). Qn reflects the long-term average bytes that can be sent by the queue. The initial value of DN is zero, and the value is 0 when the queue is empty. When the DRR Algorithm serves a new queue, the scheduler resets the counter bsent (indicating the number of bytes that the loop has sent from the queue ). When the following two conditions are met, the DRR Algorithm sends groups from the queue:
L groups in the queue are waiting for sending;
L (qn + DN) is greater than or equal to (the length of the next group in the bsent + Queue ).
Otherwise, the difference DN + 1 in the queue is set to qn + DN-bsent, And the scheduler moves to the next queue in sequence. Qn + DN indicates the maximum number of bytes that can be sent by the queue during the service interval. To a certain extent, dn can smooth the burst of data streams. The queue uses Qn to obtain long-term relative bandwidth allocation. If the number of active queues is less than N, the Active Queue can share unused output link bandwidth based on the Qn value.
4. WRR (Weighted Round Robin)-weighted Cyclic Scheduling Algorithm
Packet-based weighted scheduling WRR allows you to configure how many packets are scheduled in each queue and then switch to the next queue. For example, the scheduling weights of queue 0-queue 7 are set to, and in sequence. The scheduling method is as follows:
Packets P1 ~ P11 ~ P... Enter different priority queues according to the classification, and the classification is mapped to the port Queue according to the local priority of the packets. If the packet enters the queues as shown in the figure, WRR is scheduled, and the weight of queue 7 is 3 to schedule three packets P1, P2, and P3, and then enter queue 6, the weight of the queue is 2 to schedule two packets P4, and then enter the next-level queue after P5. If there are no messages in the next-level queue, directly enter the next-level queue, and then enter the queue 7 after one round-robin is completed, no messages in queue 7 directly enter queue 6. The order of the messages is P1, P2, P3, P4, P5, P7, p8, P10, P6, P9, and P11.
5. WDRR (Weighted Deficit Round Robin)-Weighted differential Cyclic Scheduling
This algorithm is based on two variables: the quota (quantum) and the credit counter. The quota represents the weight, in bytes, and is a configurable parameter, the balance indicates the accumulation and consumption of quotas. It is a status parameter and cannot be configured. In the initial state, the balance of each queue is equal to its quota. When each message is sent, the balance is equal to the number of bytes of the message, when the balance is less than 0, the scheduling of this queue is stopped. When scheduling is stopped for all queues, the quota is added for all queues. The weight N ranges from 0 ~ 127. If the weight is N, the quota is (N * MTU_QUANTA) bytes. (MTU_QUANTA is 2 K), and N is 0, which indicates a strict priority.
WDRR scheduling Diagram
Packets P1 ~ P11 ~ P... Enter different priority queues according to the classification, and the classification is mapped to the port Queue according to the local priority of the packets. If the packet enters the queues as shown in the figure, WDRR is scheduled, and the packet p1 ~ If p11 is 1200 bytes in size, the 7 weight of the queue is 3, that is, 3*2 K = 6 K bytes of messages are scheduled each time, and 6 K bytes are scheduled from the 7 queues, if no messages in the queue are directly sent to the next queue, queue 6 is scheduled to 1*2 K = 2 K Bytes each time. Then, two packets p4 and p5 are scheduled with a balance of-400 bytes, next, go to the next queue scheduling. The weight of queue 1 is 1, and each packet is p10 and p11 in 2 K Bytes. The balance is-400 bytes. After one round robin, go to the high-priority queue, the queue 6 is distributed to the 2 k quota. Due to the previous failure of-400 bytes, this scheduling can only schedule 1600 bytes. The final packet sequence is p1, p2, p3, p4, p5, p8, p9, p10, p11, p6, p7, p12.
6. DWRR:
Dynamic Weighted Round-Robin -- Dynamic Weighted cycle method.
7. SDWRR: