cgset
set cgroup parameters
TLDR
Set CPU quota for a cgroup
SYNOPSIS
cgset [-r name=value]... cgroup
cgset --copy-from source destination
DESCRIPTION
cgset modifies parameters of existing control groups (cgroups). It allows setting resource limits and controls for CPU, memory, I/O, and other subsystems on groups of processes.
Common parameters include CPU shares (relative priority), CPU quotas (hard limits), memory limits, and I/O weights. The available parameters depend on which controllers are mounted and the cgroup version.
cgset is part of libcgroup-tools for managing cgroups v1. For cgroups v2, systemd or direct filesystem writes are typically used instead.
PARAMETERS
-r name=value
Set a parameter to a value.--copy-from cgroup
Copy parameters from another cgroup.-h, --help
Display help information.
CAVEATS
Requires appropriate permissions (typically root). Parameter names and values are controller-specific. Invalid values may be rejected by the kernel. Only works with cgroups v1 hierarchy. Some parameters cannot be changed while processes are in the cgroup.
HISTORY
cgset is part of libcgroup, developed by Red Hat starting around 2008 to provide user-space cgroup management. The tool provided a way to configure resource limits without direct filesystem manipulation. As cgroups v2 and systemd became prevalent, direct management through these tools became less common.
