]> git.proxmox.com Git - pve-docs.git/commitdiff
qm: resource limits: revise section affinity
authorAlexander Zeidler <a.zeidler@proxmox.com>
Tue, 16 Jan 2024 13:22:40 +0000 (14:22 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Feb 2024 12:01:23 +0000 (13:01 +0100)
* mention side effects
* increase compactness w/o complexity
* improve section-formatting

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
qm.adoc

diff --git a/qm.adoc b/qm.adoc
index 580d8dbfb07c409e4a4331b7e15f7bbfcb784b2d..86762d352c22adca83147a4c03cf04056de4096e 100644 (file)
--- a/qm.adoc
+++ b/qm.adoc
@@ -380,20 +380,24 @@ For more information see `man systemd.resource-control`, here `CPUQuota`
 corresponds to `cpulimit` and `CPUWeight` to our `cpuunits` setting. Visit its
 Notes section for references and implementation details.
 
-The third CPU resource limiting setting, *affinity*, controls what host cores
-the virtual machine will be permitted to execute on. E.g., if an affinity value
-of `0-3,8-11` is provided, the virtual machine will be restricted to using the
-host cores `0,1,2,3,8,9,10,` and `11`. Valid *affinity* values are written in
-cpuset `List Format`. List Format is a comma-separated list of CPU numbers and
-ranges of numbers, in ASCII decimal.
-
-NOTE: CPU *affinity* uses the `taskset` command to restrict virtual machines to
-a given set of cores. This restriction will not take effect for some types of
-processes that may be created for IO. *CPU affinity is not a security feature.*
-
-For more information regarding *affinity* see `man cpuset`. Here the
-`List Format` corresponds to valid *affinity* values. Visit its `Formats`
-section for more examples.
+*affinity*
+
+With the *affinity* option you can specify the physical CPU cores which are
+used to run the VM's vCPUs. Periphal VM processes, such as those for I/O, are
+not affected by this setting. Note that the *CPU affinity is not a security
+feature*.
+
+Forcing a CPU *affinity* can make sense in certain cases, but is accompanied by
+an increase in complexity and maintenance effort. For example, if you want to
+add more VMs later or migrate VMs to nodes with fewer CPU cores. It can also
+easily lead to asynchronous and therefore limited system performance if some
+CPUs are fully utilized while others are almost idle.
+
+The *affinity* is set by calling `taskset`. It accepts the host CPU numbers
+(see `lscpu`) in the `List Format` from `man cpuset`. This ASCII decimal list
+can contain numbers but also number ranges. E.g., the *affinity* `0-1,8-11` (or
+alternatively `0,1,8,9,10,11`) only allow the VM to run on these six host
+cores.
 
 CPU Type
 ^^^^^^^^