FIFO and WFQ

Overview of FIFO and WFQ
First-in-first-out (FIFO) and weighted fair queuing (WFQ) are the two primary default queuing mechanisms that are implemented on Cisco routers. Despite a number of drawbacks, FIFO is the most-used queuing mechanism and it is supported in all versions of Cisco IOS. WFQ, which dynamically divides available bandwidth by a calculation based on the total number of flows and the weight of each given flow, was developed to resolve some of the problems resulting from the use of basic queuing methods, including FIFO, such as queue starvation, delay, and jitter.

FIFO

The FIFO queuing mechanism
FIFO queuing has no classification because all packets belong to the same class. Packets are dropped when the output queue is full – this process is known as tail dropping. The scheduler services packets in the order in which they arrive. The software FIFO queue is basically an extension of the hardware FIFO queue.

Although FIFO queuing might be regarded as the fairest queuing mechanism, it has some significant drawbacks:

  • FIFO is extremely unfair when an aggressive flow is contesting with a fragile flow. Aggressive flows send a large number of packets, many of which are dropped. Fragile flows send a modest amount of packets, and most of them are also dropped because the queue is always full due tothe aggressive flow. This type of behavior is called starvation.
  • Short or long bursts cause a FIFO queue to fill. Packets entering an almost-full queue have to wait a long time before they can be transmitted. At another time, the queue might be empty,causing packets of the same flow to experience almost no delay. Such variation in delay is called jitter.

In spite of such drawbacks, FIFO is still the most-used queuing mechanism because of the following benefits:

  • FIFO is simple and fast. Most high-end routers with fast interfaces are not really affected by problems such as starvation and jitter. Furthermore, routers are not capable of complex classification and scheduling when they have to process a large number of packets per second. FIFO is, therefore, the most suitable queuing mechanism on these router platforms.
  • FIFO is supported • on all platforms.
  • FIFO queuing is supported in all versions of Cisco IOS.

To enable FIFO, you need to disable WFQ, which is automatically enabled on interfaces with less than 2Mbps of bandwidth.

The WFQ queuing mechanism
WFQ was introduced to address the problems associated with other queuing mechanisms. For example, FIFO queuing causes starvation, delay, and jitter, and the PQ queuing mechanism causes starvation of other lower priority classes and suffers from all the problems associated with FIFO within each of the four queues that it uses for prioritization. CQ causes long delays and also suffers from all of FIFO’s problems within each of the 16 queues that it uses for traffic classification. WFQ was developed to alleviate these problems by

  • having a dedicated queue for each flow – this means there is no starvation, delay, or jitter within the queue
  • allocating bandwidth fairly and accurately among all flows, which results in minimum scheduling delay and guaranteed service
  • using IP precedence as weight when allocating bandwidth

WFQ uses automatic classification, which means that manually defined classes are not supported. WFQ dropping is not a simple tail dropping process. Instead, WFQ drops the packets of the most aggressive flows. The WFQ scheduler is a simulation of a time-division multiplexing (TDM) system. The bandwidth is fairly distributed to all active flows.

WFQ is supported on most Cisco routers, as well as on Versatile Interface Processors (VIPs). The implementation of WFQ on the VIP differs slightly from its implementation on the majority of Cisco platforms. For example, classification identifies a flow and assigns a queue to the flow, and weight is used for scheduling to give proportionately more bandwidth to flows with a higher IP precedence. In addition, the tail-dropping scheme is improved to drop packets of the most aggressive flows.

Advantages and disadvantages of WFQ queuing
WFQ offers a number of advantages over other queuing mechanisms:

  • it’s simple to configure, so no manual classification is necessary
  • it guarantees throughput to all flows
  • it drops the packets of the most aggressive flows
  • it’s supported on most platforms
  • it’s supported in all IOS versions

Nevertheless, there are also a number of drawbacks associated with WFQ:

  • it’s not always possible to have one flow per queue
  • it does not allow manual classification
  • it cannot provide fixed guarantees
  • its classification and scheduling mechanisms are complex

Despite these drawbacks, WFQ is a useful queuing mechanism, and it is automatically enabled on all interfaces that have a default bandwidth of less than 2 Mbps.

As a summary
First-in-first-out (FIFO) and weighted fair queuing (WFQ) are the two main default queuing mechanisms implemented on Cisco routers. Although FIFO is the fairest queuing mechanism, it has some significant drawbacks in that its use can cause the queuing problems known as starvation, delay, and jitter. Despite this, FIFO is the most suitable queuing mechanism for high-end router platforms that aren’t seriously affected by these problems. FIFO is supported on all platforms and all versions of Cisco IOS.

Developed to resolve some of the problems resulting from the use of basic queuing methods such as FIFO, WFQ dynamically divides available bandwidth by a calculation based on the total number of flows and the weight of each given flow. Supported on most platforms and on all versions of Cisco
IOS, WFQ has the advantage of being simple to configure. Other benefits include the ability to drop the packets of the most aggressive flows and to guarantee throughput to all flows. However, WFQ also has a number of drawbacks. It does not allow manual classification and it cannot provide fixed
guarantees. Furthermore, its classification and scheduling mechanisms are complex, and it’s not always possible to have one flow per queue in WFQ.

No comments yet.

Leave a Reply