> My question is: If all the queues are configured for high-priority and all are currently in profile, then how does WRR chose
> which queue to services first? What determines the "weighting" of the queue to be serviced first: transmit-rate, buffer-size,
> etc.?
Hi,
Let me try to explain this without simplifying too much..
This is a Round Robin discipline, so queues are served in a round robin fashion. If you have 4 high-priority queues, and there are always packets into them, the order would always be 0,1,2,3,0,1,2,3...
However, once a queue is being serviced, it has the possibility of trasmitting an amount of data which is proportional to its transmit ratio; so it is not a matter of 'which queue is served first', but 'which queue will send the most when it is being serviced'. And the 'weight' is given by the transmit rate.
This is in practice implemented with a deficit-based WRR discipline, where each queue is assigned an amount of 'transmission credit', which is periodically increased proportionally to the queue transmit ratio.
Whenever a packet is dequeued, the 'transmission credit' decreases, and if it goes into negative the scheduler moves to service the next queue.
The buffer size instead is used to influence the size (i.e. length) of the transmission queue, i.e. how many milliseconds of traffic you can buffer to absorbe a burst - at the cost of introducing a delay. So it does not influence the order of servicing.
Saverio