]> git.proxmox.com Git - pve-docs.git/commitdiff
Merge branch 'taskset' into taskset-merged
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 10 Nov 2022 09:11:15 +0000 (10:11 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 10 Nov 2022 09:11:15 +0000 (10:11 +0100)
1  2 
qm.adoc
qm.conf.5-opts.adoc

diff --cc qm.adoc
index cb301eb94dda19ec3e148956e632faa1bcbb9c95,372272696602987650009d1938ce33ba8d6bec22..e7d0c07d9605172b1f98c3f42649db59398c41c2
+++ b/qm.adoc
@@@ -311,24 -310,39 +311,39 @@@ other VMs and CTs would get to less CPU
  real host cores CPU time. But, if only 4 would do work they could still get
  almost 100% of a real core each.
  
 -NOTE: VMs can, depending on their configuration, use additional threads e.g.,
 -for networking or IO operations but also live migration. Thus a VM can show up
 -to use more CPU time than just its virtual CPUs could use. To ensure that a VM
 -never uses more CPU time than virtual CPUs assigned set the *cpulimit* setting
 -to the same value as the total core count.
 +NOTE: VMs can, depending on their configuration, use additional threads, such
 +as for networking or IO operations but also live migration. Thus a VM can show
 +up to use more CPU time than just its virtual CPUs could use. To ensure that a
 +VM 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. For
 +example, 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 `CPUShares` corresponds to our `cpuunits`
 +corresponds to `cpulimit` and `CPUWeight` 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
  ^^^^^^^^
  
Simple merge