Home

cpuset

cpuset is a Linux kernel mechanism used to partition processor resources and memory locality for groups of tasks. It is implemented as part of the cgroup subsystem and allows administrators to designate which CPUs a group of processes may run on and from which NUMA memory nodes memory allocations may come. This helps improve cache locality and performance in multi-processor and NUMA systems.

A cpuset forms a hierarchical set within the cgroup filesystem. Each cpuset has attributes such as the

Usage and applications include isolation and performance optimization for workloads. cpuset is commonly used by container

Notes and limitations: cpuset primarily controls where a task may execute and from which memory nodes it

CPUs
and
memory
nodes
assigned
to
it,
and
a
tasks
file
that
lists
the
PIDs
belonging
to
the
set.
New
processes
typically
inherit
the
cpuset
membership
of
their
parent.
Child
cpusets
can
narrow
or
extend
the
available
CPUs
or
memory
nodes,
providing
finer
control
over
resource
placement
within
the
system.
runtimes
and
orchestration
tools
to
bind
containers
or
services
to
specific
CPUs
and
NUMA
nodes,
reducing
interference
between
workloads
and
improving
locality.
It
can
also
be
used
to
separate
foreground
work
from
background
daemons
or
to
enforce
scheduling
locality
in
NUMA-aware
environments.
may
allocate
memory;
it
does
not
by
itself
enforce
hard
memory
usage
quotas.
Operating
on
cpusets
typically
requires
elevated
privileges,
such
as
root
or
appropriate
capabilities.
In
modern
systems,
cpuset
interacts
with
other
cgroup
controllers,
and
its
interface
appears
in
the
cgroup
hierarchy
under
sysfs,
with
exact
paths
depending
on
the
system’s
cgroup
configuration.