From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id AE927917D3 for ; Fri, 7 Oct 2022 14:42:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8417225D8F for ; Fri, 7 Oct 2022 14:42:05 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 7 Oct 2022 14:42:04 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E84274484F for ; Fri, 7 Oct 2022 14:42:03 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Fri, 7 Oct 2022 14:41:39 +0200 Message-Id: <20221007124156.110246-3-f.ebner@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221007124156.110246-1-f.ebner@proxmox.com> References: <20221007124156.110246-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.027 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH docs 2/2] pct/qm: update cpuunits default X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2022 12:42:35 -0000 which is 100 on hosts running cgroup v2. Still mention the old default relevant for hosts with legacy cgroups. Also reword the sentence with "gets in regards to other VMs running" which sounded a bit off. Signed-off-by: Fiona Ebner --- pct.adoc | 5 +++-- qm.adoc | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pct.adoc b/pct.adoc index ebae3e9..90a6d04 100644 --- a/pct.adoc +++ b/pct.adoc @@ -427,8 +427,9 @@ cpulimit: 0.5 `cpuunits`: :: This is a relative weight passed to the kernel scheduler. The larger the number is, the more CPU time this container gets. Number is relative -to the weights of all the other running containers. The default is 1024. You -can use this setting to prioritize some containers. +to the weights of all the other running containers. The default is `100` (or +`1024` if the host uses legacy cgroup v1). You can use this setting to +prioritize some containers. [[pct_memory]] diff --git a/qm.adoc b/qm.adoc index 19ac15d..0adf98d 100644 --- a/qm.adoc +++ b/qm.adoc @@ -317,12 +317,12 @@ never uses more CPU time than virtual CPUs assigned set the *cpulimit* setting to the same value as the total core count. The second CPU resource limiting setting, *cpuunits* (nowadays often called CPU -shares or CPU weight), controls how much CPU time a VM gets in regards to other -VMs running. It is a relative weight which defaults to `1024`, if you increase -this for a VM it will be prioritized by the scheduler in comparison to other -VMs with lower weight. E.g., if VM 100 has set the default 1024 and VM 200 was -changed to `2048`, the latter VM 200 would receive twice the CPU bandwidth than -the first VM 100. +shares or CPU weight), controls how much CPU time a VM gets compared to other +running VMs. It is a relative weight which defaults to `100` (or `1024` if the +host uses legacy cgroup v1). If you increase this for a VM it will be +prioritized by the scheduler in comparison to other VMs with lower weight. E.g., +if VM 100 has set the default `100` and VM 200 was changed to `200`, the latter +VM 200 would receive twice the CPU bandwidth than the first VM 100. For more information see `man systemd.resource-control`, here `CPUQuota` corresponds to `cpulimit` and `CPUWeight` corresponds to our `cpuunits` -- 2.30.2