7.3 Different types of Queue objects
A queue object is a general class of object capable of holding and
possibly marking or discarding packets as they travel through the
simulated topology. Configuration Parameters used for queue objects are:
- limit_
- The queue size in packets.
- blocked_
- Set to false by default, this is true if the queue is
blocked (unable to send a packet to its downstream neighbor).
- unblock_on_resume_
- Set to true by default, indicates a queue
should unblock itself at the time the last packet packet sent has been
transmitted (but not necessarily received).
Other queue objects derived from the base class Queue are drop-tail, FQ,
SFQ, DRR, RED and CBQ queue objects. Each are described as follows:
- Drop-tail objects:
Drop-tail objects are a subclass of Queue objects that implement simple
FIFO queue. There are no methods, configuration parameter, or state
variables that are specific to drop-tail objects.
- FQ objects:
FQ objects are a subclass of Queue objects that implement Fair queuing.
There are no methods that are specific to FQ objects.
Configuration Parameters are:
- secsPerByte_
-
There are no state variables associated with this object.
- SFQ objects:
SFQ objects are a subclass of Queue objects that implement Stochastic Fair
queuing. There are no methods that are specific to SFQ objects.
Configuration Parameters are:
- maxqueue_
- buckets_
-
There are no state variables associated with this object.
- DRR objects:
DRR objects are a subclass of Queue objects that implement deficit round
robin scheduling. These objects implement deficit round robin scheduling
amongst different flows ( A particular flow is one which has packets with
the same node and port id OR packets which have the same node id alone).
Also unlike other multi-queue objects, this queue object implements a
single shared buffer space for its different flows. Configuration
Parameters are:
- buckets_
- Indicates the total number of buckets to be used for
hashing each of the flows.
- blimit_
- Indicates the shared buffer size in bytes.
- quantum_
- Indicates (in bytes) how much each flow can send during
its turn.
- mask_
- mask_, when set to 1, means that a particular flow consists
of packets having the same node id (and possibly different port ids),
otherwise a flow consists of packets having the same node and port ids.
- RED objects:
RED objects are a subclass of Queue objects that implement random
early-detection gateways. The object can be configured to either drop or
``mark'' packets. There are no methods that are specific to RED objects.
Configuration Parameters are:
- bytes_
- Set to "true" to enable ``byte-mode'' RED, where the size
of arriving packets affect the likelihood of marking (dropping) packets.
- queue-in-bytes_
- Set to "true" to measure the average queue size in bytes rather than
packets. Enabling this option also causes thresh_ and maxthresh_ to be
automatically scaled by mean_pktsize_ (see below).
- thresh_
- The minimum threshold for the average queue size in packets.
- maxthresh_
- The maximum threshold for the average queue size in packets.
- mean_pktsize_
- A rough estimate of the average packet size in bytes. Used in updating the
calculated average queue size after an idle period.
- q_weight_
- The queue weight, used in the exponential-weighted moving average for
calculating the average queue size.
- wait_
- Set to true to maintain an interval between dropped packets.
- linterm_
- As the average queue size varies between "thresh_" and "maxthresh_", the
packet dropping probability varies between 0 and "1/linterm".
- setbit_
- Set to "true" to mark packets by setting the congestion indication bit in
packet headers rather than drop packets.
- drop-tail_
- Set to true to use drop-tail rather than randomdrop when the queue
overflows or the average queue size exceeds "maxthresh_". For a further
explanation of these variables, see [2].
None of the state variables of the RED implementation are accessible.
- CBQ objects:
CBQ objects are a subclass of Queue objects that implement class-based
queueing.
$cbq insert class
Insert traffic class class into the link-sharing structure associated with
link object cbq.
$cbq bind cbqclass id1 [$id2]
Cause packets containing flow id id1 (or those in the range id1 to
id2 inclusive) to be associated with the traffic class cbqclass.
$cbq algorithm alg
Select the CBQ internal algorithm. <alg> may be set to one of:
"ancestor-only", "top-level", or "formal".
- CBQ/WRR objects:
CBQ/WRR objects are a subclass of CBQ objects that implement weighted
round-robin scheduling among classes of the same priority level. In
contrast, CBQ objects implement packet-by-packet round-robin scheduling
among classes of the same priority level. Configuration Parameters are:
- maxpkt_
- The maximum size of a packet in bytes. This is used only
by CBQ/WRR objects in computing maximum bandwidth allocations for the
weighted round-robin scheduler.
CBQCLASS OBJECTS
CBQClass objects implement the traffic classes associated with CBQ
objects.
$cbqclass setparams parent okborrow allot maxidle prio level
Sets several of the configuration parameters for the CBQ traffic class
(see below).
$cbqclass parent cbqcl|none
specify the parent of this class in the link-sharing tree. The parent may
be specified as ``none'' to indicate this class is a root.
$cbqclass newallot a
Change the link allocation of this class to the specified amount (in range
0.0 to 1.0). Note that only the specified class is affected.
$cbqclass install-queue q
Install a Queue object into the compound CBQ or CBQ/WRR link structure.
When a CBQ object is initially created, it includes no internal queue
(only a packet classifier and scheduler).
Configuration Parameters are:
- okborrow_
- is a boolean indicating the class is permitted to borrow
bandwidth from its parent.
- allot_
- is the maximum fraction of link bandwidth allocated to the
class expressed as a real number between 0.0 and 1.0.
- maxidle_
- is the maximum amount of time a class may be required to
have its packets queued before they are permitted to be forwarded
- priority_
- is the class' priority level with respect to other classes. This value may
range from 0 to 10, and more than one class may exist at the same
priority. Priority 0 is the highest priority.
- level_
- is the level of this class in the link-sharing tree. Leaf nodes in the
tree are considered to be at level 1; their parents are at level 2, etc.
- extradelay_
- increase the delay experienced by a delayed class by the specified time
QUEUE-MONITOR OBJECTS
QueueMonitor Objects are used to monitor a set of packet and byte arrival,
departure and drop counters. It also includes support for aggregate
statistics such as average queue size, etc.
$queuemonitor
reset all the cumulative counters described below (arrivals, departures,
and drops) to zero. Also, reset the integrators and delay sampler, if
defined.
$queuemonitor set-delay-samples delaySamp_
Set up the Samples object delaySamp_ to record statistics about queue
delays. delaySamp_ is a handle to a Samples object i.e the Samples object
should have already been created.
$queuemonitor get-bytes-integrator
Returns an Integrator object that can be used to find the integral of the
queue size in bytes.
$queuemonitor get-pkts-integrator
Returns an Integrator object that can be used to find the integral of the
queue size in packets.
$queuemonitor get-delay-samples
Returns a Samples object delaySamp_ to record statistics about queue
delays.
There are no configuration parameters specific to this object.
State Variables are:
- size_
- Instantaneous queue size in bytes.
- pkts_
- Instantaneous queue size in packets.
- parrivals_
- Running total of packets that have arrived.
- barrivals_
- Running total of bytes contained in packets that have
arrived.
- pdepartures_
- Running total of packets that have departed (not
dropped).
- bdepartures_
- Running total of bytes contained in packets that have
departed (not dropped).
- pdrops_
- Total number of packets dropped.
- bdrops_
- Total number of bytes dropped.
- bytesInt_
- Integrator object that computes the integral of the
queue size in bytes. The sum_ variable of this object has the running sum
(integral) of the queue size in bytes.
- pktsInt_
- Integrator object that computes the integral of the queue
size in packets. The sum_ variable of this object has the running sum
(integral) of the queue size in packets.
QUEUEMONITOR/ED OBJECTS
This derived object is capable of differentiating regular packet drops
from early drops. Some queues distinguish regular drops (e.g. drops due to
buffer exhaustion) from other drops (e.g. random drops in RED queues).
Under some circumstances, it is useful to distinguish these two types of
drops.
State Variables are:
- epdrops_
- The number of packets that have been dropped ``early''.
- ebdrops_
- The number of bytes comprising packets that have been
dropped ``early''.
Note: because this class is a subclass of QueueMonitor, objects of this
type also have fields such as pdrops_ and bdrops_. These fields describe
the total number of dropped packets and bytes, including both early and
non-early drops.
QUEUEMONITOR/ED/FLOWMON OBJECTS
These objects may be used in the place of a conventional QueueMonitor
object when wishing to collect per-flow counts and statistics in addition
to the aggregate counts and statistics provided by the basic QueueMonitor.
$fmon classifier cl
This inserts (read) the specified classifier into (from) the flow monitor
object. This is used to map incoming packets to which flows they are
associated with.
$fmon dump
Dump the current per-flow counters and statistics to the I/O channel
specified in a previous attach operation.
$fmon flows
Return a character string containing the names of all flow objects known
by this flow monitor. Each of these objects are of type
QueueMonitor/ED/Flow.
$fmon attach chan
Attach a tcl I/O channel to the flow monitor. Flow statistics are written
to the channel when the dump operation is executed.
Configuration Parameters are:
- enable_in_
- Set to true by default, indicates that per-flow
arrival state should be kept by the flow monitor. If set to false, only
the aggregate arrival information is kept.
- enable_out_
- Set to true by default, indicates that per-flow departure state should be
kept by the flow monitor. If set to false, only the aggregate departure
information is kept.
- enable_drop_
- Set to true by default, indicates that per-flow drop state should be kept
by the flow monitor. If set to false, only the aggregate drop information
is kept.
- enable_edrop_
- Set to true by default, indicates that per-flow early drop state should be
kept by the flow monitor. If set to false, only the aggregate early drop
information is kept.
QUEUEMONITOR/ED/FLOW OBJECTS
These objects contain per-flow counts and statistics managed by a
QueueMonitor/ED/Flowmon object. They are generally created in an OTcl
callback procedure when a flow monitor is given a packet it cannot map on
to a known flow. Note that the flow monitor's classifier is responsible
for mapping packets to flows in some arbitrary way. Thus, depending on the
type of classifier used, not all of the state variables may be relevant
(e.g. one may classify packets based only on flow id, in which case the
source and destination addresses may not be significant).
State Variables are:
- src_
- The source address of packets belonging to this flow.
- dst_
- The destination address of packets belonging to this flow.
- flowid_
- The flow id of packets belonging to this flow.
Tom Henderson
2011-11-05