Article ID: 16115
Products
I-Series
G-Series
D-Series
C5, C3, C2-Series
B5, B3, B2-Series
A4, A2-Series
Goals
How does Weighted Round Robin (WRR) traffic queueing work in conjunction with Strict traffic queueing?
How would this WRR configuration allocate traffic transmission resources?: B5(su)->
show port txq ge.1.1
Port Alg Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
----- --- --- --- --- --- --- --- --- ---
ge.1.1 WRR 10 10 10 10 60 SP SP SP
B5(su)->
Solution
Queues are serviced from the highest numbered queue to the lowest. The greater the configured time share configured for a WRR queue, the more time is spent servicing it (to a maximum of the assigned time, or transmission of all the queue's traffic, whichever comes first) before moving to the next queue. With this arrangement, it is assumed that the queues will be allocated servicing time somewhat in proportion to the queue number. That is, the higher the queue number, the greater the amount of servicing time assigned to it, and the better the servicing. However, that is not a requirement.
Here's some additional background that can help with configuration:
14109, "
code:C2/B2 f/w x.02.13 Strict Priority configuration may not correctly reload
"
Determining just how much WRR "servicing time" (actually, number of packets forwarded) per transmit queue may be intuited from a review of Wikipedia document
http://en.wikipedia.org/wiki/Weighted_round_robin:
Weighted round robin (WRR) is a scheduling discipline, the simplest approximation of generalized processor sharing (GPS). While GPS serves infinitesimal amounts of data from each nonempty queue, WRR serves a number of packets for each nonempty queue: // calculate number of packets to be served each round by connections
for each flow f
f.normalized_weight = f.weight / f.mean_packet_size
min = findSmallestNormalizedWeight
for each flow f
f.packets_to_be_served = f.normalized_weight / min
// main loop
loop
for each non-empty flow queue f
min(f.packets_to_be_served, f.packets_waiting).times do
servePacket f.getPacketAssuming a fixed packet size of 60 bytes, the algorithm would in this example...
- compute normalized weight as 60/60 for Q4, and 10/60 for Q3, Q2, Q1, and Q0
- determine that the minimum normalized weight is 10/60
- determine that the number of packets to be forwarded per queue per WRR cycle is 6 for Q4, and 1 for Q3, Q2, Q1, and Q0
Thus, a single cycle through the transmit queues - these endlessly repeat - would...
- first transmit all packets waiting in Q7
- then transmit all packets waiting in Q6 (but if new packets are waiting in Q7, go there)
- then transmit all packets waiting in Q5 (but if new packets are waiting in Q7/Q6, go there)
- then transmit up to 6 packets waiting in Q4 (but if new packets are waiting in Q7/Q6/Q5, go there)
- then transmit up to 1 packet waiting in Q3 (but if new packets are waiting in Q7/Q6/Q5, go there)
- then transmit up to 1 packet waiting in Q2 (but if new packets are waiting in Q7/Q6/Q5, go there)
- then transmit up to 1 packet waiting in Q1 (but if new packets are waiting in Q7/Q6/Q5, go there)
- then transmit up to 1 packet waiting in Q0 (but if new packets are waiting in Q7/Q6/Q5, go there)