mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-05-08 19:27:04 +00:00
qm: resource limits: revise section affinity
* mention side effects * increase compactness w/o complexity * improve section-formatting Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
This commit is contained in:
parent
6a31c01b5a
commit
b3848f246c
28
qm.adoc
28
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.
|
||||
*affinity*
|
||||
|
||||
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.*
|
||||
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*.
|
||||
|
||||
For more information regarding *affinity* see `man cpuset`. Here the
|
||||
`List Format` corresponds to valid *affinity* values. Visit its `Formats`
|
||||
section for more examples.
|
||||
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
|
||||
^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user