all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexander Zeidler <a.zeidler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH docs 3/3] qm: resource limits: revise section affinity
Date: Tue, 16 Jan 2024 14:22:40 +0100	[thread overview]
Message-ID: <20240116132240.132246-3-a.zeidler@proxmox.com> (raw)
In-Reply-To: <20240116132240.132246-1-a.zeidler@proxmox.com>

* mention side effects
* increase compactness w/o complexity
* improve section-formatting

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
---
 qm.adoc | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/qm.adoc b/qm.adoc
index 15aa0fc..d92db75 100644
--- 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
 ^^^^^^^^
-- 
2.39.2





  parent reply	other threads:[~2024-01-16 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 13:22 [pve-devel] [PATCH docs 1/3] qm: resource limits: revise section cpulimit Alexander Zeidler
2024-01-16 13:22 ` [pve-devel] [PATCH docs 2/3] qm: resource limits: revise section cpuunits Alexander Zeidler
2024-01-16 13:22 ` Alexander Zeidler [this message]
2024-02-20 12:36 ` [pve-devel] applied-series: [PATCH docs 1/3] qm: resource limits: revise section cpulimit Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240116132240.132246-3-a.zeidler@proxmox.com \
    --to=a.zeidler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal