public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Bowder <daniel@bowdernet.com>
To: pve-devel@lists.proxmox.com
Cc: Daniel Bowder <daniel@bowdernet.com>
Subject: [pve-devel] [PATCH v2 pve-docs 2/4] fix #3593: add affinity to docs
Date: Thu, 30 Jun 2022 17:09:46 -0700	[thread overview]
Message-ID: <20220701000948.148496-3-daniel@bowdernet.com> (raw)
In-Reply-To: <20220701000948.148496-1-daniel@bowdernet.com>

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             | 15 +++++++++++++++
 qm.conf.5-opts.adoc |  4 ++++
 2 files changed, 19 insertions(+)

diff --git a/qm.adoc b/qm.adoc
index 4d0c7c4..3722726 100644
--- 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
 ^^^^^^^^
 
diff --git a/qm.conf.5-opts.adoc b/qm.conf.5-opts.adoc
index a56dc5d..e46b4c2 100644
--- a/qm.conf.5-opts.adoc
+++ b/qm.conf.5-opts.adoc
@@ -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.
-- 
2.36.1




  parent reply	other threads:[~2022-07-01  0:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  0:09 [pve-devel] [PATCH SERIES v2 manager/docs/widget-toolkit/qemu-server 0/4] fix #3593 Daniel Bowder
2022-07-01  0:09 ` [pve-devel] [PATCH v2 qemu-server 1/4] fix #3593: add affinity to qemu Daniel Bowder
2022-07-01  0:09 ` Daniel Bowder [this message]
2022-07-01  0:09 ` [pve-devel] [PATCH v2 proxmox-widget-toolkit 3/4] fix #3593: add CpuSet type to js Daniel Bowder
2022-07-01  0:09 ` [pve-devel] [PATCH v2 pve-manager 4/4] fix #3593: add js input for affinity Daniel Bowder
2022-11-10  9:57 ` [pve-devel] applied-series: [PATCH SERIES v2 manager/docs/widget-toolkit/qemu-server 0/4] fix #3593 Wolfgang Bumiller

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=20220701000948.148496-3-daniel@bowdernet.com \
    --to=daniel@bowdernet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal