From: Alexandre Derumier Date: Fri, 6 Nov 2020 08:24:54 +0000 (+0100) Subject: bugfix: cpushares : default value is 1024 for cgroup v1 X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=6d7c3065962d1920a1c407cc744c0677cff6f7db bugfix: cpushares : default value is 1024 for cgroup v1 Currently if we delete cpuunit (undef), the default value is 100 --- diff --git a/src/PVE/CGroup.pm b/src/PVE/CGroup.pm index 45b9e7c..71d0846 100644 --- a/src/PVE/CGroup.pm +++ b/src/PVE/CGroup.pm @@ -472,7 +472,7 @@ sub change_cpu_shares { die "cpu weight (shares) must be in range [1, 10000]\n" if $shares < 1 || $shares > 10000; PVE::ProcFSTools::write_proc_entry("$path/cpu.weight", $shares); } elsif ($ver == 1) { - $shares //= 100; + $shares //= 1024; PVE::ProcFSTools::write_proc_entry("$path/cpu.shares", $shares // $cgroupv1_default); } else { die "bad cgroup version: $ver\n";