home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.lbl.gov
/
2014.05.ftp.ee.lbl.gov.tar
/
ftp.ee.lbl.gov
/
cbq2.0g.tar.Z
/
cbq2.0g.tar
/
README-cbq-use
Wrap
Text File
|
1998-07-06
|
14KB
|
280 lines
This note is intended to clarify how to use Class-Based Queueing (CBQ) in
combination with RSVP. It is assumed that the reader of this document is
familiar with the contents of the the documents mentioned in the
reference section below.
Introduction:
============
In providing resource management facilities for the gateway, CBQ
presents a number of management features as well a variety of operating
modes. This document provides a brief overview of each of these
features. For more detailed information on CBQ and its implementation,
please visit:
http://www-nrg.ee.lbl.gov/cbq.html
Principles of Operation:
========================
As a link-sharing mechanism, CBQ presents the gateway with new
functionality for resource management. First and foremost, CBQ
introduces the notion of allowing multiple agencies, protocol families,
or traffic types to share the bandwidth of a given network link.
Furthermore, using the same set of mechanisms, CBQ implements the
traffic control capabilities that are required to implement IETF's
Intergrated Services models. Many of the features and functionality
are enabled via a configuration file whose syntax and definition are
discussed later in the document.
One of the primary goals of CBQ is to allow each leaf and interior
class of the link sharing structure to receive its allocated bandwidth
over some appropriate time interval given sufficient demand. Secondly,
if all classes have received their allocated bandwidth, the
distribution of any "excess" bandwidth should follow some set of
reasonable guidelines. To acheive the aforementioned goals, the CBQ
framework decomposes the problem of resource management into two types
of scheduling functions: a link-sharing scheduler and a generalized packet
scheduler. The link-sharing scheduler is responsible for maintaining
link-sharing constraints within a link-sharing structure. The generalized
packet scheduler will differentiate service between packets based on other
requirements such as delay, jitter, and loss.
This CBQ implementation contains a variety of features. The feature list
includes top-level link-sharing scheduler, packet-by-packet round robin
(PRR) packet scheduler, and weighted round robin (WRR) packet scheduler.
As described in [1], the top-level link-sharing scheduler approximates
that of the formal link-sharing scheduler without the computational
complexity of formal link-sharing. Top-level link-sharing uses a
hueristic called "top-level" to maintain link-sharing constraints.
This "top-level" hueristic refers to the depth of the link-sharing
structure to which a given traffic class may borrow bandwidth. Rules
for setting the "top level" heuristic can be found in [1]. In
top-level link-sharing, a traffic class may continue to emit traffic in
a unregulated fashion, under the following conditions: the traffic
class is not overlimit; the traffic class has an underlimit ancestor
whose level is atmost "top-level". If neither condition is true, then
the class is overlimit and must be regulated. Currently, packets of an
overlimit class are dropped, if sufficent backlog builds up. Other future
strategies might include re-classification of the packet.
Other features of this CBQ implementation include two generalized
packet schedulers, PRR and WRR. In both cases, the scheduling
algorithms employ priority based scheduling. In this scheme, packets
are sent from the highest priority level first. Where the packet
schedulers differ is with regard to how the packets are scheduled
within a priority level. For PRR, plain round-robin scheduling
arbitrates between traffic classes in the same priority level. The WRR
scheduler differs in that it employs weights proportional to a traffic
class' bandwidth allocation. The weight determines the number of bytes
that a traffic class is allowed to send in a scheduling round. If a
packet to be transmitted by the WRR scheduler is larger that the
class's weight, and the class is underlimit (via link-sharing
constraints), then the packet is sent. This allows the traffic class
to borrow ahead from its weighted allotment for future rounds of the
round-robin.
In an example link-sharing structure with a root class and 3 child
classes (classes A, B, and C), CBQ will enfore link-sharing rules such
that each child class gets its respective bandwidth. If, for example,
class B does not offer any traffic load, then classes A and C are free
to borrow the excess bandwidth that class B is not using. Once class B
starts offering load, then classes A and C will halt borrowing class
B's bandwidth. Borrowing for a given traffic class is enabled via the
configuration file. In order for a class to borrow bandwidth, the
"borrow" parameter in the configuration file for the borrowing class
must be set to its parent. Equally, the "root" class of this
link-sharing structure represents the entire link. Therefore, the
"root" class never will have packets queued behind it. Only leaf
classes will have traffic queues. A minimal link-sharing structure is
described below.
Finally, a work-conserving mode called "efficient" mode is included
in this CBQ implementation. "Efficient" mode enables CBQ to send a packet
From an overlimit class if all classes of the link-sharing structure
are overlimit. This effectively enables CBQ to adjust to real network
conditions. For example, if the target interface link speed is
5,000,000 bits/second in a shared ethernet environment, CBQ will use
that 5Mbits and then some if the environment is lightly loaded.
Hence, CBQ will allow all classes to grab extra network capacity when
the network is lightly loaded. Conversely, if the network becomes
heavily loaded, CBQ will adjust itself accordingly. The same will hold
true about the efficient mode in half-duplex switched environments.
There are, however, some implications of using this mode. "Efficient"
mode will allow some traffic classes to get an "unfair" portion of the
"excess" bandwidth. Hence, the "excess" bandwidth may not be shared
equally with other classes of the link-sharing structure. But, other
traffic classes in the link-sharing structure will continue to receive
their allocated bandwidth. In general, great caution should be used
in employing "efficient" mode. Only in situations where "fair" sharing
of excess bandwidth is not a principle concern should "efficient" mode
be enabled.
Know Limitations:
================
This CBQ implementation is still maturing. There are some known limitations
with this implementation. First, this CBQ implementation requires the
use of modified ethernet drivers to enable CBQ to receive the appropriate
feedback to operate properly. A future version of Solaris will incorporate
appropriate feedback mechanisms such that hand crafted drivers are not
required. Next, the CBQ implementation has not been tested thoroughly on
a large set of traffic classes. Next, it is believed that link-sharing
configuration of 200 or more traffic classes will cause unpredictable results
with this CBQ implemtation. This issue is under examination and improvements
will be made available at a future date.
Finally, CBQ is a packet scheduler for the local host interface. It is
not the traffic control mechanism for a shared access network. To
obtain quality of service in a shared access network, the network, one
needs RSVP, CBQ (or some other packet scheduler), and the switches/hubs
need to implement something like SBM[2] and IEEE 802.1p. In general, CBQ
can serve as the network traffic control mechanism in point-to-point style
networks such as T1 lines, PPP over Sonet, ISDN or dial-up PPP links.
Configuration file:
===================
The ensuing sections define the syntax of the configuration file and how
to parameterize some of the parameters. More detailed information on setting
parameters can be found in [4].
Interface Specification:
=======================
The syntax of the interface specification is as follows:
interface <interface type> bandwidth <b> cbq|cbq-wrr [stats] [efficient]
<interface type> specifies the interface name for which to enable CBQ.
Currently, hme, le, qe, ifppp, and ipdptp are supported.
Bandwidth <b> is the target link bandwidth. For some environments, such
as shared ethernet, this may vary because of the nature of the medium.
For full-duplex switched ethernet environments, this tends to be full
link speed of the ethernet interface.
<cbq|cbq-wrr> is the selection the packet scheduler to be used.
Current choices include: "cbq" and "cbq-wrr". "CBQ" selects CBQ's
packet-by-packet round robin scheduler, whereas, "cbq-wrr" selects
CBQ's weighted round robin scheduler.
[Efficient] mode enable is the selection of putting CBQ into a
work-conserving mode. The keyword "efficient" will enable CBQ to send
a packet from an overlimit class, if all classes of the link-sharing
hierarchy are overlimit.
[Stats] enable puts CBQ into a primitive statistical collection mode.
This is primarily used for debugging purposes. The output of this mode
is sent directly to /dev/console.
Class Specification:
===================
For the class specification, the following syntax is used:
class <scheduler> <interface type> <class-name> <parent-class-name|NULL>
[priority <sched-pri>] [pbandwidth <p>] \
[admission predictive|guaranteed|none] \
[borrow <borrow_class>] \
[maxburst <burst count>] [packetsize <size>] \
[default]
<Scheduler> is the packet scheduler that this class definition it be
associated with. Currently, "cbq" and "cbq-wrr" are the choices.
<Interface type> is the interface that the class will be created on.
"Class name" is the name of the class.
<Parent classname> is the name of the parent class of this class.
The root class does not have a parent class. Hence the parent class is
"null". All other classes MUST have a parent class.
<Priority <p>> is the class priority for the CBQ schedulers for both
WRR and PRR. Maximum priority is 7. Lowest priority is 0.
<Pbandwidth <bandwidth>> is the percentage of the interface bandwidth to
be assigned to this traffic class. Generally, the sum of each pbandwidth
parameter for all classes other than the root class should add up to the
pbandwidth parameter of the root class.
[Admission <cntlload|none>] is the type of admission control and QoS type
RSVP is to provide to the class. Currently, "cntlload" and "none" are
the only valid admission types. If the value is "none", RSVP will not
classify flows to this class. If the value is "cntlload", then RSVP
will classify Controlled Load Service flows as defined in [3] to this class.
[Borrow <borrow_class>] enables borrowing for the class. If the class
is not to borrow bandwidth, then a borrow definition should not be
defined. The class name for borrowing MUST be that of the parent class
for the class.
[Maxburst <burst>] specifies the maximum back-to-back packet burst
allowed for the traffic class. Maximum burst should be set such that
it is larger than the maximum token bucket depth for any RSVP flows
that will be mapped to the traffic class. The default is 20 packets.
[Minburst <burst>] specifies the minimum waiting time for an overlimit
class. This defines, in average sized packet times, how far into the
future the class will need to wait before being able to send traffic
again. The default for "minburst" is 2.
<Packetsize <size>> is the expected average packetsize for the the
class. The default value is 1000 bytes.
[Default] defines the class to be where all unclassified (usually the
best-effort) traffic will be placed. Every link-sharing structure MUST
have a "default" traffic class.
Samples Configurations:
======================
The minimum link-sharing structure that one can define is a structure
with a root class and a child class that is the "default" class.
Thus, the example below is the absolute minimum configuration in order
for CBQ to work properly:
interface le0 bandwidth 10000000 cbq
class cbq le0 root_class NULL priority 3 admission none pbandwidth 100
class cbq le0 data_class root_class priority 3 pbandwidth 100 default
Now for more sophisticated configurations, other parameterizations of
class hierarchies can be configured. For example, a partitioning of the
a link that will have Controlled Load traffic and best effort traffic
might look like:
interface le0 bandwidth 10000000 cbq-wrr
class cbq le0 root_class NULL priority 3 admission none pbandwidth 100
class cbq le0 res_class root_class priority 7 pbandwidth 20
class cbq le0 unres_class root_class priority 3 pbandwidth 80 default
In the above example each child class get 20% and 80% of the link
bandwidth respectively. Neither will get to borrow bandwidth unless
borrowing is enabled. If borrowing is enabled for both of the
children, then each class may borrow all "excess" bandwidth that is
available.
References:
==========
1. S. Floyd and V. Jacobson. "Link-sharing and Resource
Management models for packet networks." IEEE/ACM
Transactions on Networking 3(4), 1995.
2. R. Yavatkar, D. Hoffman, Y. Bernet, and F. Baker.
"SBM(Subnet Bandwidth Manager): A proposal for Admission
Control over IEEE 802-style networks." Internet Draft,
ftp://ftp.ietf.org/internet-drafts/
draft-ietf-issll-is802-sbm-04.txt
3. J. Wroclawski. "Specification of the Controlled-Load
Network Element Service." RFC 2211, http://www.ietf.org.
4. S. Floyd and M. Speer. "Experimental Results for
Class-Based Queueing.", Work in progress,
http://www-nrg.ee.lbl.gov/cbq/