public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* Re: [pve-devel] [PATCH] Update cpu.weight default to match documented default
       [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
  1 sibling, 1 reply; 5+ messages in thread
From: Fiona Ebner @ 2022-08-19 10:01 UTC (permalink / raw)
  To: Matt Corallo, pve-devel

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@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";
>      }
>      }
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH] Update cpu.weight default to match documented default
  2022-08-19 10:01 ` [pve-devel] [PATCH] Update cpu.weight default to match documented default Fiona Ebner
@ 2022-08-19 10:03   ` Fiona Ebner
  0 siblings, 0 replies; 5+ messages in thread
From: Fiona Ebner @ 2022-08-19 10:03 UTC (permalink / raw)
  To: pve-devel

Sorry, replied to the wrong mail. Please ignore this.

On 19.08.22 12:01, Fiona Ebner wrote:
> 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@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";
>>      }
>>      }
>>
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH] Update cpu.weight default to match documented default
       [not found] <a5789fb9-b22a-a58a-9190-fa34e89c41a2@bluematt.me>
  2022-08-19 10:01 ` [pve-devel] [PATCH] Update cpu.weight default to match documented default Fiona Ebner
@ 2022-08-19 10:08 ` Fiona Ebner
       [not found]   ` <837ccb7a-a073-09ac-f4ab-708b797d41b1@bluematt.me>
  1 sibling, 1 reply; 5+ messages in thread
From: Fiona Ebner @ 2022-08-19 10:08 UTC (permalink / raw)
  To: Matt Corallo, pve-devel

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";
>      }
>      }
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH] Update cpu.weight default to match documented default
       [not found]   ` <837ccb7a-a073-09ac-f4ab-708b797d41b1@bluematt.me>
@ 2022-08-24  8:26     ` Fiona Ebner
  2022-09-02  6:33       ` Thomas Lamprecht
  0 siblings, 1 reply; 5+ messages in thread
From: Fiona Ebner @ 2022-08-24  8:26 UTC (permalink / raw)
  To: Matt Corallo, pve-devel; +Cc: Thomas Lamprecht

Am 24.08.22 um 01:56 schrieb Matt Corallo:
> 
> 
> On 8/19/22 6:08 AM, Fiona Ebner wrote:
>> 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'
> 
> Hmm, am I understanding that correctly that now I have to figure out if
> I'm using cgroup2 or cgroup1 to figure out if the default is 1024 or
> 100? Or are modern PVE's all running cgroup2 and the UI simply needs to
> be updated universally to say that the default is now 100?
> 
> Matt
> 

PVE 7.x uses cgroupv2 by default, so reporting the new default in the UI
would be correct for most installations. That said, we do still support
cgroupv1[0], so ideally, the default in the UI would be shown depending
on the cgroup version the node is actually running.

I think this was the plan, but it never got realized. This (not yet
applied) patch[1] would expose the cluster node's cgroup version to
other nodes, to be used by the frontend.

@Thomas: Is this still the plan? If it is, I'll cook up a v2 adding UI
and doc patches.

[0] https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0#CGroupV2
[1] https://lists.proxmox.com/pipermail/pve-devel/2021-July/049253.html




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH] Update cpu.weight default to match documented default
  2022-08-24  8:26     ` Fiona Ebner
@ 2022-09-02  6:33       ` Thomas Lamprecht
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2022-09-02  6:33 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner, Matt Corallo

Am 24/08/2022 um 10:26 schrieb Fiona Ebner:
> Am 24.08.22 um 01:56 schrieb Matt Corallo:
>>
>>
>> On 8/19/22 6:08 AM, Fiona Ebner wrote:
>>> 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'
>>
>> Hmm, am I understanding that correctly that now I have to figure out if
>> I'm using cgroup2 or cgroup1 to figure out if the default is 1024 or
>> 100? Or are modern PVE's all running cgroup2 and the UI simply needs to
>> be updated universally to say that the default is now 100?
>>
>> Matt
>>
> 
> PVE 7.x uses cgroupv2 by default, so reporting the new default in the UI
> would be correct for most installations. That said, we do still support
> cgroupv1[0], so ideally, the default in the UI would be shown depending
> on the cgroup version the node is actually running.
> 
> I think this was the plan, but it never got realized. This (not yet
> applied) patch[1] would expose the cluster node's cgroup version to
> other nodes, to be used by the frontend.
> 
> @Thomas: Is this still the plan? If it is, I'll cook up a v2 adding UI
> and doc patches.

Could be nice, systemd will drop cgroup v1 support completely at EOY 2023[0]
and so we should be able to still offer opt-in support for cgroup v1 in Proxmox
VE 8.x, and so ~ 2026 which may help some users that are still stuck on some
legacy, extended LTS CTs, and after that distro's like Ubuntu 16.04 (the last
Ubuntu LTS with an to old systemd for automatic v2 support) will be EOL anyway.


Note that I also stumbled over the following, which may be worth investigating
if I didn't read it wrong:

> Hmm, cgroupv1 named hiearchies should still be available even on
> cgroupv2 hosts. I am pretty sure nspawn at least should have no
> problem with running old cgroupv1 payloads on a cgroupv2 host.
> 
> Isn't this issue just an artifact of the fact that LXD doesn't
> pre-mount cgroupfs? Or does it do so these days? because systemd's
> PID1 since time began would just use the cgroup setup it finds itself
> in if it's already mounted/set up. And only mount and make a choice
> between cgroup1 or cgroupv2 if there's really nothing set up so far.
> 
> Because of that I see no reason why old systemd cgroupv1 payloads
> shouldn#t just work on cgroupv2 hosts: as long as you give them a
> pre-set-up cgroupv1 environemnt, and nothing stops you from doing
> that. In fact, this is something we even documented somewhere: what to
> do if the host only does a subset of the cgroup stuff you want, and
> what you have to do to set up the other stuff (i.e. if host doesn't
> manage your hierarchy of choice, but only others, just follow the same
> structure in the other hierarchy, and clean up after yourself). This
> is what nspawn does: if host is cgroupv2 only it will set up
> name=systemd hierarchy in cgroupv1 itself, and pass that to the
> container.
-- [1]


[0]: https://github.com/systemd/systemd/pull/24086/files
[1]: https://lists.freedesktop.org/archives/systemd-devel/2022-July/048123.html




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-02  6:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <a5789fb9-b22a-a58a-9190-fa34e89c41a2@bluematt.me>
2022-08-19 10:01 ` [pve-devel] [PATCH] Update cpu.weight default to match documented default Fiona Ebner
2022-08-19 10:03   ` Fiona Ebner
2022-08-19 10:08 ` Fiona Ebner
     [not found]   ` <837ccb7a-a073-09ac-f4ab-708b797d41b1@bluematt.me>
2022-08-24  8:26     ` Fiona Ebner
2022-09-02  6:33       ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal