[pve-devel] [PATCH] Update cpu.weight default to match documented default
Fiona Ebner
f.ebner at proxmox.com
Fri Aug 19 12:01:07 CEST 2022
Hi,
On 16.08.22 05:49, Matt Corallo wrote:
> Proxmox documentation describes the default CPU weight as 1024 in
> numerous places. However, when unset, the Linux default CGROUP
> weight is 100.
>
I'm not saying increasing the timeout can't be worth it, but I haven't
seen many reports about the default being too low. There is a patch in
the works [0] allowing to set custom options in the storage
configuration for CIFS which would allow changing the timeout only for
setups that actually require it.
[0]: https://lists.proxmox.com/pipermail/pve-devel/2022-July/053645.html
P.S. re-sending while including the pve-devel list
> This simply always writes an `lxc.cgroup2.cpu.weight` option to the
> LXC config file, defaulting to 1024 instead of omitting the option
> entirely.
>
> Signed-off-by: Matt Corallo <git at bluematt.me>
> ---
> src/PVE/LXC.pm | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index fe63087..ca453a9 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -712,6 +712,9 @@ sub update_lxc_config {
> die "cpu weight (shares) must be in range [1, 10000]\n"
> if $shares < 1 || $shares > 10000;
> $raw .= "lxc.cgroup2.cpu.weight = $shares\n";
> + } else {
> + # Default as documented
> + $raw .= "lxc.cgroup2.cpu.weight = 1024\n";
> }
> }
>
More information about the pve-devel
mailing list