pvenode: document ballooning-target node option

Also adjust the ballooning documentation to mention and
cross-reference this node option.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Link: https://lore.kernel.org/r/20250312151506.128311-5-f.weber@proxmox.com
This commit is contained in:
Friedrich Weber 2025-03-12 16:15:06 +01:00 committed by Thomas Lamprecht
parent f332026019
commit 72c9efe062
2 changed files with 21 additions and 5 deletions

View File

@ -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[]

13
qm.adoc
View File

@ -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