Calculate queue depth and bandwidth allocation for QoS traffic classes.
Quality of Service (QoS) queueing allocates a link's finite bandwidth among traffic classes according to priority weights. Weighted Fair Queuing (WFQ) gives each queue a bandwidth share strictly proportional to its weight relative to the total: per_queue_bandwidth = total × (weight / sum_of_weights) — every queue always gets its proportional share, even under congestion. Strict Priority Queuing instead services higher-priority queues first up to their full demand, with lower-priority queues only getting what's left over, which better protects latency-sensitive traffic (like voice) but can starve lower-priority queues entirely under heavy load.
Weighted Fair Queuing allocation
per_queue_bandwidth = total_bandwidth × (weight / sum_of_all_weights)
Strict priority always services the highest-priority queue's traffic first, so lower-priority queues can be completely starved if high-priority traffic saturates the link. WFQ instead guarantees every queue its proportional weighted share regardless of congestion, trading some priority protection for fairness.
Voice (VoIP) traffic is extremely sensitive to latency and jitter — even small delays cause audible quality problems — while consuming relatively little bandwidth overall, making it a natural candidate for strict priority treatment ahead of bulk data transfers.
Yes — in both WFQ and strict priority models, weights and priority only determine how bandwidth is divided under contention. If the link has spare capacity beyond what higher-priority/weighted queues are actually using, lower-priority queues can typically use the surplus.
Weights are usually set proportional to each traffic class's expected or required bandwidth share — e.g. giving voice a smaller absolute weight but treating it with strict priority, while splitting the remaining weight among video, business-critical data, and best-effort traffic based on business needs.