Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Tài liệu Queuing Mechanisms doc
Nội dung xem thử
Mô tả chi tiết
Queuing Mechanisms
Overview
This module describes the queuing mechanisms that can be used on output
interfaces.
It includes the following topics:
n Queuing Overview
n FIFO Queuing
n Priority Queuing
n Custom Queuing
n Weighted Fair Queuing
n Distributed Weighted Fair Queuing
n Modified Deficit Round-robin
n IP RTP Prioritization
Objectives
Upon completion of this module, you will be able to perform the following tasks:
n Describe and configure FIFO Queuing (FQ)
n Describe and configure Priority Queuing (PQ)
n Describe and configure Custom Queuing (CQ)
n Describe and configure basic Weighted Fair Queuing (WFQ), distributed WFQ,
ToS-based distributed WFQ and QoS-group-based distributed WFQ
n Describe and configure Modified Weighted Round-robin (MDRR) queuing
n Describe and configure IP RTP Prioritization
3-2 Queuing Mechanisms Copyright ” 2001, Cisco Systems, Inc.
Queuing Overview
Objectives
Upon completion of this lesson, you will be able to perform the following tasks:
n Understand how queuing works on Cisco routers
n List the most used queuing mechanisms
Copyright ” 2001, Cisco Systems, Inc. Queuing Mechanisms 3-3
© 2001, Cisco Systems, Inc. Queuing Mechanisms -5
Queuing in Cisco IOS
• Cisco routers running Cisco IOS have a number of
different queuing mechanisms
• This module focuses on the following:
– First In First Out (FIFO)
– Priority Queuing (PQ)
– Custom Queuing (CQ)
– Weighted Fair Queuing (WFQ) with the different
distributed versions
– Modified Deficit Round Robin (MDRR)
– IP RTP Prioritization
• These mechnisms are implemented as software
queues
The lesson discusses how output queuing mechanisms are implemented on Cisco
routers running Cisco IOS. It discusses most of the queuing mechanisms in detail,
except Class-based Weighted Fair Queuing and Class-based Low-latency
Queuing, which are discussed in the “IP QoS – Modular QoS CLI (Chapter 2)”
module.
3-4 Queuing Mechanisms Copyright ” 2001, Cisco Systems, Inc.
© 2001, Cisco Systems, Inc. Queuing Mechanisms -6
Output Interface Queue Structure
• Each Interface has its hardware and software queuing
system
• The hardware queuing system always uses FIFO queuing
(Transmission queue or TxQ)
• The software queuing system can be selected and
configured depending on the platform and Cisco IOS
version
Hardware
Queue
(TxQ)
Software
Queuing
System
Output
Interface Forwarder
Any supported Always FIFO
queuing mechanism
Queuing on routers is necessary to accommodate bursts when the arrival rate of
packets is greater than the departure rate due to one of the following two reasons:
n Input interface is faster than the output interface
n Output interface is receiving packets coming in from multiple other interfaces
Initial implementations of queuing used a single FIFO (first-in first-out or first-come
first-serve queuing) strategy. More complex queuing mechanisms were introduced
when special requirements need routers to differentiate between packets of
different importance.
Queuing was split into two parts:
n The hardware queue that still uses FIFO strategy, which is necessary for the
interface drivers to transmit packets one by one. The hardware queue is
sometimes referred to as the transmit queue or TxQ.
n The software queue that schedules packets into the hardware queue based on
the QoS requirements
Listed on the previous graphic are some of the available software queuing
strategies with their goals:
n FIFO: no differentiation of packets (true fairness but no guarantees)
n Priority Queuing (PQ): strict prioritizing of packets
n Custom Queuing (CQ): service (bandwidth) guaranteed to up to 16 classes
n Weighted Fair Queuing (WFQ) and Distributed WFQ: service (bandwidth)
guarantee to individual flows
n Distributed ToS-based WFQ: service (bandwidth) guaranteed to up to 4 classes
Copyright ” 2001, Cisco Systems, Inc. Queuing Mechanisms 3-5
n Distributed QoS-group-based WFQ: service (bandwidth) guaranteed to up to
100 classes
n Modified Deficit Round-robin (MDRR): service (bandwidth) guaranteed to up
to 8 classes; low-delay guarantee if Strict or Alternate Priority is used
n IP RTP Prioritization: low-delay guarantee
Most queuing mechanisms depend on the availability on different platforms and
Cisco IOS versions. For example:
n MDRR is only available on Cisco 12000 series routers (GSR)
n Distributed ToS-based and QoS-group-based WFQ are only available on Cisco
7x00 series routers with Versatile Interface Processors (VIP)
3-6 Queuing Mechanisms Copyright ” 2001, Cisco Systems, Inc.
© 2001, Cisco Systems, Inc. Queuing Mechanisms -7
Bypassing the Software Queue
• When a packet is being forwarded the router will bypass the
software queue if:
– the software queue is empty and
– the hardware queue is not full
Software Queue
Empty?
Hardware Queue
Full?
Hardware
Queue
(TxQ)
Yes No
Software
Queuing
System
No Yes
The implementation of software queuing was optimized for periods when the
interface is not congested. The software queuing system is bypassed whenever
there is no packet in the software queue and there is room in the hardware queue.
The software queue is, therefore, only used when data must wait to be placed into
the hardware queue.
Copyright ” 2001, Cisco Systems, Inc. Queuing Mechanisms 3-7
© 2001, Cisco Systems, Inc. Queuing Mechanisms -8
Hardware Queue (TxQ) Size
• Routers determine the length of the hardware
queue based on the configured bandwidth of
the interface
• Long TxQ may result in poor performance of
the software queue
• Short TxQ may result in a large number of
interrupts which causes high CPU utilization
and low link utilization
The double queuing strategy (software and hardware queue) has its impacts on the
result of overall queuing:
n Software queue is used for a certain reason. If the hardware queue is too long
it will contain a large number of packets scheduled in the FIFO fashion. This is
probably against the QoS design that required a certain complex software
queuing system (for example, Custom Queuing).
So why use the hardware queue at all? Or why not just set its length to one? That
would force all packets to go through the software queue and be scheduled one by
one to the interface for transmission. This approach has the following drawbacks:
n Each time a packet is transmitted, the interface driver interrupts the CPU and
requests more packets to be delivered into its hardware queue. Some queuing
mechanisms have complex scheduling that takes time to deliver more packets.
The interface does not send anything during that time (link utilization is
decreased) if the hardware queue is empty because its maximum size is one.
n The CPU schedules packets one by one instead of many at the same time (in
the same interrupt interval). This increases the CPU utilization.
Choosing the appropriate length of the hardware queue is very important. The
default TxQ size is determined by the IOS based on the bandwidth of the media
and should be fine for most queuing implementations. Faster interfaces have longer
hardware queues because they produce less delay. Slower interfaces have shorter
hardware queues to prevent too much delay in the worst-case scenario where the
entire hardware queue is full of MTU-sized packets.
3-8 Queuing Mechanisms Copyright ” 2001, Cisco Systems, Inc.
© 2001, Cisco Systems, Inc. Queuing Mechanisms -9
Software Queuing System
Hardware
Queuing System
Queuing Components
• Each queuing mechanism has three main components that define it:
– Classification (selecting the class)
– Insertion policy (determining whether a packet can be enqueued)
– Service policy (scheduling packets to be put into the hardware queue)
Class 1?
Class 2?
Class n?
Queue 1
Queue 2
Queue n
Scheduler Interface
Forwarded Packets
Hardware Q
Add/Drop
Add/Drop
Add/Drop
The figure illustrates the actions that have to be taken before a packet can be
transmitted:
n Most queuing mechanisms include classification of packets.
n Once a packet is classified, a router has to determine whether it can put the
packet into the queue or it has to drop the packet. Most queuing mechanisms
will drop a packet only if the corresponding queue is full (tail-drop). Some
mechanisms use a more intelligent dropping scheme (Weighted Fair Queuing)
or a random dropping scheme (Weighted Random Early Detection).
n If the packet is allowed to be enqueued it will be put into the FIFO queue for
that particular class.
n Packets are then taken from the individual per-class queues and put into the
hardware queue.
Queuing systems differ in the following ways:
n Classification options: some mechanisms classify packets automatically (for
example, WFQ), while other mechanisms require manual configuration of
classification (for example, PQ or CQ).
n Insertion policy: most queuing mechanisms use the tail-dropping scheme.
n Scheduling policy: this is the most important part of every queuing mechanism
because it determines the order in which the packets will leave the router.
Copyright ” 2001, Cisco Systems, Inc. Queuing Mechanisms 3-9
Summary
After completing this lesson, you should be able to perform the following tasks:
n Understand how queuing works on Cisco routers
n List the most used queuing mechanisms
Review Questions
Answer the following questions:
n Which queuing mechanisms do Cisco routers support?
n When is a software queuing mechanisms not used?
n How does TxQ length affect the software queuing system?
3-10 Queuing Mechanisms Copyright ” 2001, Cisco Systems, Inc.
FIFO Queuing
Objectives
Upon completion of this lesson, you will be able to perform the following tasks:
n Describe FIFO queuing
n Describe the drawbacks of FIFO queuing
n Configure FIFO queuing on Cisco routers
n Monitor and troubleshoot FIFO queuing
Copyright ” 2001, Cisco Systems, Inc. Queuing Mechanisms 3-11
© 2001, Cisco Systems, Inc. Queuing Mechanisms-14
FIFO Queuing
• Software FIFO queue is basically an extension to the
hardware FIFO queue
FIFO Queuing System Hardware
Queuing System
All in one
queue
Queue 1 FIFO
Scheduler Interface
Forwarded Packets
Tail-drop Hardware Q
Routers serve packets in the
first-come first-serve fashion
FIFO uses one single queue
Newly arriving packets are
dropped if the queue is full All packets are
classified into one class
FIFO queuing has no classification because all packets belong to the same class.
Packets are dropped when the output queue is full (tail-drop). The scheduler
services packets in the order they arrived.
Software FIFO queue is basically an extension of the hardware FIFO queue.
3-12 Queuing Mechanisms Copyright ” 2001, Cisco Systems, Inc.
© 2001, Cisco Systems, Inc. Queuing Mechanisms-15
Benefits and Drawbacks of FIFO
Queuing
+ Benefits
• Simple and fast (one single queue with a simple
scheduling mechanism)
• Supported on all platforms
• Supported in all switching paths
• Supported in all IOS versions
– Drawbacks
• Unfair allocation of bandwidth among multiple flows
• Causes starvation (aggressive flows can monopolize
links)
• Causes jitter (bursts or packet trains temporarily fill
the queue)
FIFO queuing might be regarded as the fairest queuing mechanism but it has a long
list of drawbacks:
n FIFO does not fairly allocate bandwidth among multiple flows. Some flows
receive more bandwidth because they use larger packets or send more packets.
n 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
dropped because the queue is always full due to the aggressive flow. This type
of behavior is called starvation.
n 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. Another time,
the queue might be empty causing packets of the same flow to experience
almost no delay. Variation in delay is called jitter.
In spite of all the drawbacks FIFO is still the most used queuing mechanism
because of the following benefits:
n It is simple and fast. Most high-end routers with fast interfaces are not really
challenged by the drawbacks mentioned earlier. 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 mechanisms on these platforms.
n It is supported on all platforms.
n It is supported in all IOS versions.
Copyright ” 2001, Cisco Systems, Inc. Queuing Mechanisms 3-13
© 2001, Cisco Systems, Inc. Queuing Mechanisms-16
Configuring FIFO Queuing
Router(config-if)#
• FIFO queuing is enabled by default on all interfaces
that have a default bandwidth of more than 2Mbsp
• Weighted Fair Queuing is enabled if the bandwidth is
less than 2Mbps
• Disable WFQ to enable FIFO on interfaces that have
less than 2Mbps of bandwidth
no fair-queue
Cisco routers have two default queuing mechanisms:
n All interfaces with the default bandwidth above 2Mbps use FIFO queuing. No
configuration is necessary on such interfaces.
n All interfaces with the default bandwidth below 2Mbps use Weighted Fair
Queuing (WFQ). The no fair-queue command must be used to disable WFQ
and enable FIFO.
There is no special command that specifically enables FIFO.
3-14 Queuing Mechanisms Copyright ” 2001, Cisco Systems, Inc.
© 2001, Cisco Systems, Inc. Queuing Mechanisms-17
Configuring FIFO Queuing
Router(config-if)#
• FIFO queuing allows a maximum of 40 packets to be
stored in the output queue
• This command can be used to increase or decrease
the maximum number of buffered packets
• A large value can be set to support longer bursts
(less drops, more buffer usage)
• A small value can be set to prevent bursts (more
drops)
hold-queue <buffers> out
One of the considerations when using FIFO queuing is the maximum burst size.
Routers allow (by default) up to 40 packets to be in the output queue. Shortening
the queue causes more drops, especially for bursty sessions. Lengthening the
queue allows more packets to be enqueued. A long queue should be used to allow
bursts without drops.
The hold-queue command is used to set the maximum number of packets in the
output queue.