[pve-devel] [PATCH docs 4/4] pvenode: document ballooning-target node option
Friedrich Weber
f.weber at proxmox.com
Wed Mar 12 16:15:06 CET 2025
Also adjust the ballooning documentation to mention and
cross-reference this node option.
Signed-off-by: Friedrich Weber <f.weber at proxmox.com>
---
pvenode.adoc | 13 +++++++++++++
qm.adoc | 13 ++++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/pvenode.adoc b/pvenode.adoc
index 21a46a8..f3e99ce 100644
--- a/pvenode.adoc
+++ b/pvenode.adoc
@@ -192,6 +192,19 @@ pvenode migrateall pve2 --vms 100,101,102 --with-local-disks
// TODO: explain node shutdown (stopall is used there) and maintenance options
+[[ballooning-target]]
+RAM Usage Target for Ballooning
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The target percentage for xref:qm_ballooning[automatic memory allocation]
+defaults to 80%. You can customize this target per node by setting the
+`ballooning-target` property. For example, to target 90% host memory usage
+instead:
+
+----
+pvenode config set --ballooning-target 90
+----
+
ifdef::manvolnum[]
include::pve-copyright.adoc[]
endif::manvolnum[]
diff --git a/qm.adoc b/qm.adoc
index 4bb8f2c..07ec5cf 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -697,13 +697,15 @@ it (like for debugging purposes), simply uncheck *Ballooning Device* or set
in the configuration.
+[[qm_ballooning]]
.Automatic Memory Allocation
// see autoballoon() in pvestatd.pm
-When setting the minimum memory lower than memory, {pve} will make sure that the
-minimum amount you specified is always available to the VM, and if RAM usage on
-the host is below 80%, will dynamically add memory to the guest up to the
-maximum memory specified.
+When setting the minimum memory lower than memory, {pve} will make sure that
+the minimum amount you specified is always available to the VM, and if RAM
+usage on the host is below a certain target percentage, will dynamically add
+memory to the guest up to the maximum memory specified. The target percentage
+defaults to 80% and can be configured xref:ballooning-target[in the node options].
When the host is running low on RAM, the VM will then release some memory
back to the host, swapping running processes if needed and starting the oom
@@ -715,7 +717,8 @@ footnote:[A good explanation of the inner workings of the balloon driver can be
When multiple VMs use the autoallocate facility, it is possible to set a
*Shares* coefficient which indicates the relative amount of the free host memory
that each VM should take. Suppose for instance you have four VMs, three of them
-running an HTTP server and the last one is a database server. To cache more
+running an HTTP server and the last one is a database server.
+The host is configured to target 80% RAM usage. To cache more
database blocks in the database server RAM, you would like to prioritize the
database VM when spare RAM is available. For this you assign a Shares property
of 3000 to the database VM, leaving the other VMs to the Shares default setting
--
2.39.5
More information about the pve-devel
mailing list