Home

blkio

Blkio refers to the Block I/O cgroup controller in the Linux kernel. It is part of the legacy cgroup v1 subsystem and provides a way to limit and account for block device I/O on a per-cgroup basis. By attaching processes to a dedicated blkio cgroup, an administrator can cap throughput or I/O operations for specific devices and gather usage statistics.

In cgroup v1, blkio supports throttling and weighting. Throttling restricts the rate of I/O on individual devices,

Accounting data is reported through blkio.stat, which shows reads and writes in bytes and operations, by device

With the advent of cgroup v2, the blkio controller has been superseded by the unified io controller.

Usage contexts include containers, virtualization, and systems that require performance isolation. Limitations include uneven device support

using
files
such
as
blkio.throttle.read_bps_device
and
blkio.throttle.write_bps_device
for
bandwidth,
and
blkio.throttle.read_iops_device
and
blkio.throttle.write_iops_device
for
IOPS.
The
limits
are
specified
per
device
using
a
major:minor
identifier
and
a
value
representing
the
limit.
Weighting
assigns
a
relative
share
of
I/O
bandwidth
among
siblings
via
blkio.weight
and
blkio.weight_device,
allowing
proportional
distribution
when
multiple
cgroups
contend
for
I/O.
and
in
total.
The
configuration
and
statistics
are
typically
exposed
under
the
cgroup
filesystem,
often
mounted
at
paths
such
as
/sys/fs/cgroup/blkio.
In
v2,
I/O
limits
are
configured
via
files
like
io.max,
and
the
legacy
blkio
interface
is
not
central;
some
tooling
may
expose
compatibility
files
for
older
software.
for
throttling
across
hardware,
complexity
in
multi-device
scenarios,
and
changing
semantics
between
cgroup
generations.