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 v3 5/8] fix #4829: proxinstall: expose new `arc_max` ZFS option for PVE installations
Date: Tue, 31 Oct 2023 13:10:57 +0100	[thread overview]
Message-ID: <20231031121108.1130299-6-c.heiss@proxmox.com> (raw)
In-Reply-To: <20231031121108.1130299-1-c.heiss@proxmox.com>

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Changes v1 -> v2:
  * no changes

Changes v2 -> v3:
  * no changes

 proxinstall | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/proxinstall b/proxinstall
index 64c8bab..f1a3c02 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1162,6 +1162,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.42.0





  parent reply	other threads:[~2023-10-31 12:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 12:10 [pve-devel] [PATCH installer v3 0/8] fix #4829: set up lower default limit for ZFS ARC in installer Christoph Heiss
2023-10-31 12:10 ` [pve-devel] [PATCH installer v3 1/8] run env: add comment for query_total_memory() Christoph Heiss
2023-10-31 12:10 ` [pve-devel] [PATCH installer v3 2/8] tui: views: add optional suffix label for `NumericEditView`s Christoph Heiss
2023-10-31 12:10 ` [pve-devel] [PATCH installer v3 3/8] tui: bootdisk: simplify product handling by passing the config directly Christoph Heiss
2023-10-31 12:10 ` [pve-devel] [PATCH installer v3 4/8] fix #4829: install: add new ZFS `arc_max` setup option Christoph Heiss
2023-10-31 12:10 ` Christoph Heiss [this message]
2023-10-31 12:10 ` [pve-devel] [PATCH installer v3 6/8] fix #4829: test: add tests for new zfs_arc_max calculations Christoph Heiss
2023-10-31 12:10 ` [pve-devel] [PATCH installer v3 7/8] fix #4829: tui: setup: add new ZFS `arc_max` option Christoph Heiss
2023-10-31 12:11 ` [pve-devel] [PATCH installer v3 8/8] fix #4829: tui: bootdisk: expose new `arc_max` ZFS option for PVE installations Christoph Heiss
2023-11-06 14:54 ` [pve-devel] partially-applied: [PATCH installer v3 0/8] fix #4829: set up lower default limit for ZFS ARC in installer 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=20231031121108.1130299-6-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