]> git.proxmox.com Git - pve-docs.git/commitdiff
fix #3593: add affinity to docs
authorDaniel Bowder <daniel@bowdernet.com>
Fri, 1 Jul 2022 00:09:46 +0000 (17:09 -0700)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 10 Nov 2022 09:11:09 +0000 (10:11 +0100)
Added affinity to the resource limiting info in qm.adoc.
Added affinity to the qemu conf spec in qm.conf.5-opts.adoc.

Signed-off-by: Daniel Bowder <daniel@bowdernet.com>
qm.adoc
qm.conf.5-opts.adoc

diff --git a/qm.adoc b/qm.adoc
index 4d0c7c465399aced643aec6efdf281b957afc409..372272696602987650009d1938ce33ba8d6bec22 100644 (file)
--- a/qm.adoc
+++ b/qm.adoc
@@ -328,6 +328,21 @@ For more information see `man systemd.resource-control`, here `CPUQuota`
 corresponds to `cpulimit` and `CPUShares` corresponds 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.
+
 CPU Type
 ^^^^^^^^
 
index a56dc5d6909dad081ce9034123cb9b67f9e8c14b..e46b4c23f4507a9a0ee1c10d3a2ad14e7588e47e 100644 (file)
@@ -155,6 +155,10 @@ Limit of CPU usage.
 +
 NOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.
 
+`affinity`: `<string>`::
+
+Set of CPU cores to pin the virtual machine processes to. This is a comma sepparated list of numbers or ranges in list format as defined by the Linux man page for cpuset. ( e.g `0,4-6,9` )
+
 `cpuunits`: `<integer> (1 - 262144)` ('default =' `cgroup v1: 1024, cgroup v2: 100`)::
 
 CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.