From: Fiona Ebner <f.ebner@proxmox.com>
To: Matt Corallo <lpxdfsfs@mattcorallo.com>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH] Update cpu.weight default to match documented default
Date: Fri, 19 Aug 2022 12:08:00 +0200 [thread overview]
Message-ID: <5a13fe68-3c53-b986-2c09-a80d31db225d@proxmox.com> (raw)
In-Reply-To: <a5789fb9-b22a-a58a-9190-fa34e89c41a2@bluematt.me>
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'd rather update the documentation in all places, because most likely
it just wasn't adapted to mention the cgroup2 default yet. Some places
already do mention both defaults, e.g. 'man 5 qm.conf'
> 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@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";
> }
> }
>
next prev parent reply other threads:[~2022-08-19 10:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a5789fb9-b22a-a58a-9190-fa34e89c41a2@bluematt.me>
2022-08-19 10:01 ` Fiona Ebner
2022-08-19 10:03 ` Fiona Ebner
2022-08-19 10:08 ` Fiona Ebner [this message]
[not found] ` <837ccb7a-a073-09ac-f4ab-708b797d41b1@bluematt.me>
2022-08-24 8:26 ` Fiona Ebner
2022-09-02 6:33 ` Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a13fe68-3c53-b986-2c09-a80d31db225d@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=lpxdfsfs@mattcorallo.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox