Skip to content

Commit

Permalink
Make sure to enable memory and cpuset cgroup in v2
Browse files Browse the repository at this point in the history
  • Loading branch information
nickygerritsen committed Oct 10, 2024
1 parent 514d9f4 commit 0ed11cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions doc/manual/install-judgehost.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ any other tasks on the same CPU core the judgedaemon is using:
``GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory swapaccount=1 isolcpus=2"``

You have now configured the system to use cgroups. To create
the actual cgroups that DOMjudge will use, on systems with cgroups v1, you need
to run::
the actual cgroups that DOMjudge will use you need to run::

sudo systemctl enable create-cgroups --now

Expand Down
3 changes: 2 additions & 1 deletion judge/create_cgroups.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ CGROUPBASE="/sys/fs/cgroup"
# We do not need to do any of this with cgroup v2.
fs_type=$(awk '$2 == "/sys/fs/cgroup" {print $3}' /proc/mounts)
if [ "$fs_type" = "cgroup2" ]; then
echo "cgroup v2 detected, skipping cgroup creation" >&2
echo "+memory" >> /sys/fs/cgroup/cgroup.subtree_control
echo "+cpuset" >> /sys/fs/cgroup/cgroup.subtree_control
exit 0
fi

Expand Down

0 comments on commit 0ed11cc

Please sign in to comment.