Home

CFQ

CFQ, short for Completely Fair Queuing, is an input/output (I/O) scheduler for block devices in the Linux kernel. Its primary goal is to allocate disk I/O bandwidth fairly among all processes and threads that issue requests, preventing any single task from starving others while preserving reasonable latency for interactive applications.

Operation: CFQ sits in the block layer and maintains per-process and per-device request queues. Each task can

History and status: CFQ was a long-standing default I/O scheduler in many Linux distributions for desktop and

Performance considerations: For mixed workloads that include interactive tasks and background processes, CFQ often improved fairness

See also: Linux I/O scheduling, BFQ, Deadline, NOOP.

be
assigned
a
weight,
and
the
scheduler
distributes
service
time
in
a
time-slice
fashion
to
achieve
proportional
fairness.
CFQ
tracks
in-flight
requests,
prioritizes
older
or
latency-sensitive
traffic,
and
attempts
to
reduce
head-of-line
blocking
by
balancing
throughput
with
responsiveness.
It
also
supports
request
merging
and
limits
on
per-queue
depth
to
manage
overall
I/O
pressure.
server
workloads.
In
recent
years,
other
schedulers
such
as
BFQ
and
Deadline
have
gained
attention
for
specific
scenarios,
and
some
distributions
have
moved
away
from
CFQ
as
the
default
option.
Nevertheless,
CFQ
remains
available
in
modern
kernels
as
an
alternative
or
legacy
choice,
depending
on
the
distribution
and
kernel
configuration.
and
responsiveness.
Critics
have
noted
that
the
per-task
accounting
and
scheduling
overhead
can
lead
to
higher
latency
in
certain
workloads,
particularly
under
heavy
parallel
I/O.
On
solid-state
drives,
alternative
schedulers
may
offer
lower
latency
or
different
performance
characteristics,
leading
some
users
to
prefer
BFQ
or
Deadline
over
CFQ.