all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 4/4] gtk, tui: leave 1 GiB headroom for OS in ZFS ARC max size edit view
Date: Fri, 28 Feb 2025 10:43:39 +0100	[thread overview]
Message-ID: <20250228094341.147783-5-c.heiss@proxmox.com> (raw)
In-Reply-To: <20250228094341.147783-1-c.heiss@proxmox.com>

We always want to leave a little bit of extra headroom
for the OS.

This follows commit 91be6a7 [0], which adjusts the clamp calculation.
Reflect that here in the user-facing UI as well.

[0] https://git.proxmox.com/?p=pve-installer.git;a=commitdiff;h=91be6a7

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 proxinstall                                 | 3 ++-
 proxmox-tui-installer/src/views/bootdisk.rs | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/proxinstall b/proxinstall
index fe7e29f..2101f0a 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1159,9 +1159,10 @@ my $create_raid_advanced_grid = sub {
     my $total_memory = Proxmox::Install::RunEnv::get('total_memory');
     my $arc_max = Proxmox::Install::Config::get_zfs_opt('arc_max') || ($total_memory * 0.5);
 
+    # always leave a GiB as headroom for the OS
     my $arc_max_adjustment = Gtk3::Adjustment->new(
 	$arc_max, $Proxmox::Install::RunEnv::ZFS_ARC_MIN_SIZE_MIB,
-	$total_memory, 1, 10, 0);
+	$total_memory - 1024, 1, 10, 0);
     my $spinbutton_arc_max = Gtk3::SpinButton->new($arc_max_adjustment, 1, 0);
     $spinbutton_arc_max->set_tooltip_text('Maximum ARC size in megabytes');
     $spinbutton_arc_max->signal_connect('value-changed' => sub {
diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs
index 2e2019d..c8b3ef3 100644
--- a/proxmox-tui-installer/src/views/bootdisk.rs
+++ b/proxmox-tui-installer/src/views/bootdisk.rs
@@ -632,7 +632,9 @@ impl ZfsBootdiskOptionsView {
     // TODO: Re-apply previous disk selection from `options` correctly
     fn new(runinfo: &RuntimeInfo, options: &ZfsBootdiskOptions) -> Self {
         let arc_max_view = {
-            let view = IntegerEditView::new_with_suffix("MiB").max_value(runinfo.total_memory);
+            // Always leave a GiB of headroom for the OS.
+            let view =
+                IntegerEditView::new_with_suffix("MiB").max_value(runinfo.total_memory - 1024);
 
             // If the runtime environment provides a non-zero value, that is
             // also not the built-in ZFS default of half the system memory, use
-- 
2.47.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-02-28  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28  9:43 [pve-devel] [PATCH installer 0/4] tui, auto: re-use default zfs arc calculation from run env Christoph Heiss
2025-02-28  9:43 ` [pve-devel] [PATCH installer 1/4] run env: provide default ZFS ARC maximum size value Christoph Heiss
2025-02-28  9:43 ` [pve-devel] [PATCH installer 2/4] tui: use default ZFS ARC maximum size from runtime enviroment Christoph Heiss
2025-02-28  9:43 ` [pve-devel] [PATCH installer 3/4] auto: " Christoph Heiss
2025-02-28  9:43 ` Christoph Heiss [this message]
2025-04-04  8:49 ` [pve-devel] applied-series: [PATCH installer 0/4] tui, auto: re-use default zfs arc calculation from run env 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=20250228094341.147783-5-c.heiss@proxmox.com \
    --to=c.heiss@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