Weighted fair queuing

Weighted fair queuing (WFQ) can limit queue starvation by providing a fairer distribution of available bandwidth across priorities. Lower priority queues have some service even when packets are present in higher priority queues. The degree to which this occurs depends on the weights assigned to each queue.

Each queue is assigned a weight that determines its proportion of overall queue service in a given servicing window. The larger the weight, the greater the potential amount of service. Weights are used to compute a "virtual finish time" for the queue data to finish transmission. For a servicing window, the queue with the shortest virtual finishing time is selected to transmit next, and then new calculations are applied to the remaining data.

Because the "virtual finish time" calculation includes packet length, the WFQ algorithm accommodates variable traffic and services each packet as close to fair as is possible.