User Tools

Site Tools


manuals:vps:cgroups

Control groups (cgroups)

Control groups (cgroups) in Linux are used to account and limit resources of groups of processes. For example, cgroups are used to account CPU usage and let us configure quotas and memory limits. cgroups are one of the foundation blocks of vpsAdminOS: every VPS has its own cgroup and can of course create its own nested cgroups. This is usually handled by the init system and so you don't work with cgroups directly.

There are two cgroup versions: v1 and v2. Because VPS are containers, the cgroup version depends on the host and cannot be changed inside VPS. We're currently using cgroup v1. This version is slowly being deprecated and in 2024, we can expect its support to be removed from systemd.

cgroups v2

We plan to start the transition to cgroups v2 in 2023. The situation is complicated by the fact that older distributions do not support cgroups v2 and one node can use only one cgroup version. We will have to have nodes with v1 for older VPS and nodes with v2 for new VPS and distributions that support it. Our goal is to move as many VPS as possible to cgroup v2, since it also comes with performance benefits e.g. in the memory subsystem.

cgroups v2 support

The following distributions support cgroups v2:

  • Alpine Linux with up-to-date init script
  • CentOS / Alma Linux / Rocky Linux >= 8
  • Debian >= 9
  • Devuan with up-to-date init script
  • Fedora >= 31 (possibly older)
  • NixOS >= 19.03 (possibly older)
  • openSUSE Leap >= 15.1 (possibly older)
  • Ubuntu >= 18.04
  • Void Linux with up-to-date init script

Configuring cgroup version

You can configure the cgroup version that the VPS requires. For most configurations, it should be enough to rely on cgroup v2 support in the distribution. The default setting is thus to allow whatever cgroup version the distribution works with. VPS with distributions that support v2 will be moved to nodes with v2 over time.

If your VPS requires a specific cgroup version and it's not possible to change it, you can reflect this in vpsAdmin settings. If you'd like to move to a node with a different cgroup version, please contact our support (we do not have nodes with v2 yet).

manuals/vps/cgroups.txt · Last modified: 2023/03/17 15:47 by Aither