public inbox for pve-devel@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 2/6] fix #4829: proxinstall: expose new `arc_max` ZFS option for PVE installations
Date: Tue, 22 Aug 2023 12:24:50 +0200	[thread overview]
Message-ID: <20230822102533.295530-3-c.heiss@proxmox.com> (raw)
In-Reply-To: <20230822102533.295530-1-c.heiss@proxmox.com>

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 proxinstall | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/proxinstall b/proxinstall
index d5b2565..76aec17 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1144,6 +1144,21 @@ my $create_raid_advanced_grid = sub {
     $spinbutton_copies->set_value($copies);
     push @$labeled_widgets, "copies", $spinbutton_copies;
 
+    if ($iso_env->{product} eq 'pve') {
+	my $total_memory = Proxmox::Install::RunEnv::get('total_memory');
+
+	my $spinbutton_arc_max = Gtk3::SpinButton->new_with_range(
+	    $Proxmox::Install::RunEnv::ZFS_ARC_MIN_SIZE, $total_memory, 1);
+	$spinbutton_arc_max->set_tooltip_text('Maximum ARC size in megabytes');
+	$spinbutton_arc_max->signal_connect('value-changed' => sub {
+	    my $w = shift;
+	    Proxmox::Install::Config::set_zfs_opt('arc_max', $w->get_value_as_int());
+	});
+	my $arc_max = Proxmox::Install::Config::get_zfs_opt('arc_max');
+	$spinbutton_arc_max->set_value($arc_max);
+	push @$labeled_widgets, "ARC max size", $spinbutton_arc_max;
+    }
+
     push @$labeled_widgets, "hdsize", $hdsize_btn;
     return $create_label_widget_grid->($labeled_widgets);;
 };
-- 
2.41.0





  parent reply	other threads:[~2023-08-22 10:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 10:24 [pve-devel] [PATCH installer 0/6] fix #4829: set up a lower default limit for the ZFS ARC in the installer Christoph Heiss
2023-08-22 10:24 ` [pve-devel] [PATCH installer 1/6] fix #4829: install: add new ZFS `arc_max` setup option Christoph Heiss
2023-08-22 10:24 ` Christoph Heiss [this message]
2023-08-22 10:24 ` [pve-devel] [PATCH installer 3/6] fix #4829: test: add tests for new zfs_arc_max calculations Christoph Heiss
2023-08-22 10:24 ` [pve-devel] [PATCH installer 4/6] fix #4829: tui: views: add optional suffix label for `NumericEditView`s Christoph Heiss
2023-08-22 10:24 ` [pve-devel] [PATCH installer 5/6] fix #4829: tui: setup: add new ZFS `arc_max` option Christoph Heiss
2023-08-22 10:24 ` [pve-devel] [PATCH installer 6/6] fix #4829: tui: bootdisk: expose new `arc_max` ZFS option for PVE installations Christoph Heiss

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=20230822102533.295530-3-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 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