Site icon TELCOMA Training & Certifications

What is WFQ Weighted Fair Queueing

Weighted Fair Queueing (WFQ) is a network scheduling algorithm that ensures fair and efficient allocation of bandwidth among different flows. Let’s dive into the technical details:

  1. General Idea:
    • WFQ combines aspects of both Generalized Processor Sharing (GPS) and Fair Queuing (FQ).
    • It allows each flow to have a specific share of the link capacity, which is typically specified by the flow itself.
  2. GPS and FQ Background:
    • Generalized Processor Sharing (GPS) is a theoretical ideal where each flow gets an equal share of the link capacity over time.
    • Fair Queuing (FQ) divides the link’s capacity into equal subparts, ensuring fairness among flows.
  3. WFQ Parameters and Fairness:
    • In WFQ, the network administrator assigns weights to each flow. These weights determine the fraction of capacity allocated to each flow.
    • There’s no unique definition of “fairness,” but proportionally fair behavior can be achieved by setting weights based on the cost per data bit of each flow.
    • For example, in CDMA cellular networks, the cost might be energy (interference level), while in dynamic channel allocation, it could be avoiding co-channel interference.
  4. Algorithm:
    • WFQ configures a scheduler with one weight per flow (N flows).
    • Flow number i achieves an average data rate of\frac{{w_i}}{{\sum_{j=1}^{N} w_j}} \cdot \text{{link rate}}, wherew_iis the weight of flow i.
    • WFQ with equal weights becomes a standard FQ scheduler.
    • Each flow is protected from others, and end-to-end delay bounds can be guaranteed for leaky bucket-constrained flows.
  5. WFQ Implementation:
    • For each packet, a virtual theoretical departure date is computed (as if it were a perfect GPS scheduler).
    • When the output link is idle, the packet with the smallest virtual date is selected for transmission.
    • The pseudo code is similar to FQ, with the virtual departure time calculation adjusted.
  6. GPS Approximation:
    • WFQ approximates GPS “to within one packet transmission time, regardless of arrival patterns.”
    • It has the same O(log(n)) complexity as FQ, where n is the number of flows.
    • WFQ can be arbitrarily ahead of GPS but is at most “one packet” late.

Exit mobile version