<s>
A	O
network	B-Application
scheduler	I-Application
,	O
also	O
called	O
packet	B-Application
scheduler	I-Application
,	O
queueing	B-Application
discipline	I-Application
(	O
qdisc	B-Application
)	O
or	O
queueing	B-Application
algorithm	I-Application
,	O
is	O
an	O
arbiter	O
on	O
a	O
node	B-Protocol
in	O
a	O
packet	B-Protocol
switching	I-Protocol
communication	O
network	O
.	O
</s>
<s>
It	O
manages	O
the	O
sequence	O
of	O
network	B-Protocol
packets	I-Protocol
in	O
the	O
transmit	O
and	O
receive	O
queues	B-Application
of	O
the	O
protocol	B-Protocol
stack	I-Protocol
and	O
network	B-Protocol
interface	I-Protocol
controller	I-Protocol
.	O
</s>
<s>
There	O
are	O
several	O
network	B-Application
schedulers	I-Application
available	O
for	O
the	O
different	O
operating	B-General_Concept
systems	I-General_Concept
,	O
that	O
implement	O
many	O
of	O
the	O
existing	O
network	B-Application
scheduling	I-Application
algorithms	O
.	O
</s>
<s>
The	O
network	B-Application
scheduler	I-Application
logic	O
decides	O
which	O
network	B-Protocol
packet	I-Protocol
to	O
forward	O
next	O
.	O
</s>
<s>
The	O
network	B-Application
scheduler	I-Application
is	O
associated	O
with	O
a	O
queuing	O
system	O
,	O
storing	O
the	O
network	B-Protocol
packets	I-Protocol
temporarily	O
until	O
they	O
are	O
transmitted	O
.	O
</s>
<s>
Systems	O
may	O
have	O
a	O
single	O
or	O
multiple	O
queues	B-Application
in	O
which	O
case	O
each	O
may	O
hold	O
the	O
packets	B-Protocol
of	O
one	O
flow	B-Operating_System
,	O
classification	O
,	O
or	O
priority	O
.	O
</s>
<s>
In	O
these	O
cases	O
the	O
network	B-Application
scheduler	I-Application
is	O
responsible	O
for	O
deciding	O
which	O
traffic	O
to	O
forward	O
and	O
what	O
gets	O
dropped	B-Protocol
.	O
</s>
<s>
A	O
network	B-Application
scheduler	I-Application
may	O
have	O
responsibility	O
in	O
implementation	O
of	O
specific	O
network	O
traffic	O
control	O
initiatives	O
.	O
</s>
<s>
Network	O
traffic	O
control	O
is	O
an	O
umbrella	O
term	O
for	O
all	O
measures	O
aimed	O
at	O
reducing	O
network	B-Protocol
congestion	I-Protocol
,	O
latency	B-Protocol
and	O
packet	B-Protocol
loss	I-Protocol
.	O
</s>
<s>
Specifically	O
,	O
active	B-Algorithm
queue	I-Algorithm
management	I-Algorithm
(	O
AQM	O
)	O
is	O
the	O
selective	O
dropping	O
of	O
queued	O
network	B-Protocol
packets	I-Protocol
to	O
achieve	O
the	O
larger	O
goal	O
of	O
preventing	O
excessive	O
network	B-Protocol
congestion	I-Protocol
.	O
</s>
<s>
The	O
scheduler	O
must	O
choose	O
which	O
packets	B-Protocol
to	O
drop	O
.	O
</s>
<s>
Traffic	O
shaping	O
smooths	O
the	O
bandwidth	O
requirements	O
of	O
traffic	B-Operating_System
flows	I-Operating_System
by	O
delaying	O
transmission	O
packets	B-Protocol
when	O
they	O
are	O
queued	O
in	O
bursts	O
.	O
</s>
<s>
The	O
scheduler	O
decides	O
the	O
timing	O
for	O
the	O
transmitted	O
packets	B-Protocol
.	O
</s>
<s>
In	O
the	O
course	O
of	O
time	O
many	O
network	O
queueing	B-Application
disciplines	I-Application
have	O
been	O
developed	O
.	O
</s>
<s>
Each	O
of	O
these	O
provides	O
specific	O
reordering	O
or	O
dropping	O
of	O
network	B-Protocol
packets	I-Protocol
inside	O
various	O
transmit	O
or	O
receive	O
buffers	B-General_Concept
.	O
</s>
<s>
Queuing	B-Application
disciplines	I-Application
are	O
commonly	O
used	O
as	O
attempts	O
to	O
compensate	O
for	O
various	O
networking	O
conditions	O
,	O
like	O
reducing	O
the	O
latency	B-Protocol
for	O
certain	O
classes	O
of	O
network	B-Protocol
packets	I-Protocol
,	O
and	O
are	O
generally	O
used	O
as	O
part	O
of	O
QoS	O
measures	O
.	O
</s>
<s>
DRR	O
(	O
deficit	B-Algorithm
round	I-Algorithm
robin	I-Algorithm
)	O
and	O
DWRR	B-Algorithm
,	O
implementation	O
e.g.	O
</s>
<s>
written	O
by	O
Patrick	O
McHardy	O
for	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
and	O
published	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
.	O
</s>
<s>
Several	O
of	O
the	O
above	O
have	O
been	O
implemented	O
as	O
Linux	B-Application
kernel	I-Application
modules	I-Application
and	O
are	O
freely	B-License
available	I-License
.	O
</s>
<s>
Bufferbloat	O
is	O
a	O
phenomenon	O
in	O
packet-switched	B-Protocol
networks	I-Protocol
in	O
which	O
excess	O
buffering	O
of	O
packets	B-Protocol
causes	O
high	O
latency	B-Protocol
and	O
packet	B-Architecture
delay	I-Architecture
variation	I-Architecture
.	O
</s>
<s>
Bufferbloat	O
can	O
be	O
addressed	O
by	O
a	O
network	B-Application
scheduler	I-Application
that	O
strategically	O
discards	O
packets	B-Protocol
to	O
avoid	O
an	O
unnecessarily	O
high	O
buffering	O
backlog	O
.	O
</s>
<s>
Examples	O
include	O
CoDel	B-Algorithm
,	O
FQ-CoDel	O
and	O
Random	B-Algorithm
early	I-Algorithm
detection	I-Algorithm
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
packet	B-Application
scheduler	I-Application
is	O
an	O
integral	O
part	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
's	O
network	B-Protocol
stack	I-Protocol
and	O
manages	O
the	O
transmit	O
and	O
receive	O
ring	B-Data_Structure
buffers	I-Data_Structure
of	O
all	O
NICs	O
,	O
by	O
working	O
on	O
the	O
layer	B-Protocol
2	I-Protocol
of	O
the	O
OSI	O
model	O
and	O
handling	O
Ethernet	B-Protocol
frames	I-Protocol
,	O
for	O
example	O
.	O
</s>
<s>
The	O
packet	B-Application
scheduler	I-Application
is	O
configured	O
using	O
the	O
utility	O
called	O
tc	B-Application
(	O
short	O
for	O
"	O
traffic	O
control	O
"	O
)	O
.	O
</s>
<s>
As	O
the	O
default	O
queuing	B-Application
discipline	I-Application
,	O
the	O
packet	B-Application
scheduler	I-Application
uses	O
a	O
FIFO	B-Operating_System
implementation	O
called	O
pfifo_fast	O
,	O
although	O
systemd	B-Application
since	O
its	O
version	O
217	O
changes	O
the	O
default	O
queuing	B-Application
discipline	I-Application
to	O
fq_codel	O
.	O
</s>
<s>
The	O
ifconfig	B-Protocol
and	O
ip	B-Protocol
utilities	O
enable	O
system	O
administrators	O
to	O
configure	O
the	O
buffer	B-General_Concept
sizes	O
txqueuelen	O
and	O
rxqueuelen	O
for	O
each	O
device	O
separately	O
in	O
terms	O
of	O
number	O
of	O
Ethernet	B-Protocol
frames	I-Protocol
regardless	O
of	O
their	O
size	O
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
's	O
network	B-Protocol
stack	I-Protocol
contains	O
several	O
other	O
buffers	B-General_Concept
,	O
which	O
are	O
not	O
managed	O
by	O
the	O
network	B-Application
scheduler	I-Application
.	O
</s>
<s>
Berkeley	B-Protocol
Packet	I-Protocol
Filter	I-Protocol
filters	O
can	O
be	O
attached	O
to	O
the	O
packet	B-Application
scheduler	I-Application
's	O
classifiers	O
.	O
</s>
<s>
The	O
eBPF	B-Protocol
functionality	O
brought	O
by	O
version	O
4.1	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
in	O
2015	O
extends	O
the	O
classic	O
BPF	O
programmable	O
classifiers	O
to	O
eBPF	B-Protocol
.	O
</s>
<s>
These	O
can	O
be	O
compiled	O
using	O
the	O
LLVM	B-Application
eBPF	B-Protocol
backend	O
and	O
loaded	O
into	O
a	O
running	O
kernel	B-Operating_System
using	O
the	O
tc	B-Application
utility	O
.	O
</s>
<s>
ALTQ	B-Algorithm
is	O
the	O
implementation	O
of	O
a	O
network	B-Application
scheduler	I-Application
for	O
BSDs	B-Operating_System
.	O
</s>
<s>
As	O
of	O
OpenBSD	O
version	O
5.5	O
ALTQ	B-Algorithm
was	O
replaced	O
by	O
the	O
HFSC	O
scheduler	O
.	O
</s>
