mirror of
https://git.proxmox.com/git/pve-installer
synced 2025-04-28 12:51:31 +00:00
gtk, tui: leave 1 GiB headroom for OS in ZFS ARC max size edit view
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>
This commit is contained in:
parent
023812acdb
commit
10d5c08293
@ -1158,9 +1158,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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user