Home

qdiscs

In Linux networking, a qdisc (queuing discipline) is a component of the traffic control (tc) subsystem that governs how packets are queued and transmitted on a network device. Qdiscs operate at the egress of an interface and determine the order and rate at which packets leave the device. They are applied to a network interface using tc and form the lowest-level mechanism for traffic shaping and queue management.

A qdisc can be classless or classful. A classless qdisc makes enqueue decisions based solely on the

Traffic management goals of qdiscs include shaping bandwidth usage, reducing latency, and preventing bufferbloat. In particular,

Configuration and usage involve attaching a qdisc to a device, optionally with a root handle and, for

current
state
of
the
queue,
while
a
classful
qdisc
provides
a
hierarchy
of
classes
and
filters
to
direct
traffic
into
different
subqueues.
Common
classful
qdiscs
include
HTB,
HFSC,
and
CBQ,
which
support
hierarchical
scheduling
and
rate
limiting.
Classless
qdiscs
include
pfifo_fast,
fq_codel,
and
cake,
which
offer
simpler
queuing
or
congestion
avoidance
without
user-defined
classes.
Each
qdisc
exposes
parameters
such
as
queue
length,
bandwidth
limits,
and
burst
settings.
fq_codel
and
cake
are
popular
algorithms
designed
to
provide
active
queue
management
(AQM)
by
distributing
packets
across
flows
and
signaling
congestion
before
queues
fill.
Netem
is
another
qdisc
used
to
emulate
network
conditions
for
testing,
including
delay
and
loss,
while
other
qdiscs
such
as
tbf
or
others
focus
on
precise
rate
limiting.
classful
qdiscs,
creating
a
class
and
associated
filters
to
classify
traffic.
The
tc
utility
is
used
to
add,
change,
or
replace
qdiscs
and
their
classes,
and
to
attach
filters
that
steer
traffic
to
specific
classes.