[pve-devel] [PATCH docs 2/2] pct/qm: update cpuunits default
Fiona Ebner
f.ebner at proxmox.com
Fri Oct 7 14:41:39 CEST 2022
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 <f.ebner at proxmox.com>
---
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
More information about the pve-devel
mailing list