70
WRR queuing schedules all the queues in turn to ensure every queue is serviced. For example, a
port provides eight output queues. WRR assigns each queue a weight value (represented by w7, w6,
w5, w4, w3, w2, w1, or w0). The weight value of a queue decides the proportion of resources
assigned to the queue. On a 1 Gbps port, you can set the weight values to 50, 30, 10, 10, 50, 30, 10,
and 10 for w7 through w0. In this way, the queue with the lowest priority can get a minimum of 50
Mbps bandwidth. In comparison, SP queuing might fail to service packets in low-priority queues for a
long period of time.
Another advantage of WRR queuing is that when the queues are scheduled in turn, the service time
for each queue is not fixed. If a queue is empty, the next queue will be scheduled immediately. This
improves bandwidth resource use efficiency.
WRR queuing includes the following types:
•
Basic WRR queuing
—Contains multiple queues. You can configure the weight for each queue,
and WRR schedules these queues based on the user-defined parameters in a round robin
manner.
•
Group-based WRR queuing
—All the queues are scheduled by WRR. You can divide output
queues to WRR group 1 and WRR group 2. Round robin queue scheduling is performed for
group 1 first. When group 1 is empty, round robin queue scheduling is performed for group 2.
On an interface enabled with group-based WRR queuing, you can assign queues to the SP group.
Queues in the SP group are scheduled with SP. The SP group has higher scheduling priority than the
WRR groups.
Only group-based WRR queuing is supported in the current software version, and only WRR group 1
is supported.
WFQ queuing
Figure 11 WFQ queuing
WFQ automatically classifies traffic based on packet fields including protocol type, TCP or UDP
source/destination port numbers, source/destination IP addresses, and IP precedence bits in the
ToS field. To ensure proportional scheduling fairness, WFQ provides as many queues as possible so
that each traffic flow has a separate queue When dequeuing packets, WFQ assigns the outgoing
interface bandwidth to each traffic flow by precedence. The higher precedence value a traffic flow
has, the more bandwidth it gets.
For example, five flows exist in the current interface with precedence 0, 1, 2, 3, and 4. The total
bandwidth quota is the sum of all the (precedence value + 1): 1 + 2 + 3 + 4 + 5 = 15. The bandwidth
percentage assigned to each flow is (precedence value of the flow + 1)/total bandwidth quota. The
bandwidth percentages for the flows are 1/15, 2/15, 3/15, 4/15, and 5/15.
Queue 0 Weight 1
……
Queue 1 Weight 2
Queue N-2 Weight N-1
Queue N-1 Weight N
Packets to be sent through
this port
Sent packets
Interface
Queue
scheduling
Sending queue
Packet
classification