From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 371791FF165 for <inbox@lore.proxmox.com>; Wed, 12 Mar 2025 16:16:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 209258FE4; Wed, 12 Mar 2025 16:15:59 +0100 (CET) From: Friedrich Weber <f.weber@proxmox.com> To: pve-devel@lists.proxmox.com Date: Wed, 12 Mar 2025 16:15:06 +0100 Message-Id: <20250312151506.128311-5-f.weber@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250312151506.128311-1-f.weber@proxmox.com> References: <20250312151506.128311-1-f.weber@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.008 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [pvestatd.pm] Subject: [pve-devel] [PATCH docs 4/4] pvenode: document ballooning-target node option X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> Also adjust the ballooning documentation to mention and cross-reference this node option. Signed-off-by: Friedrich Weber <f.weber@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 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel