ui: expose GC cache capacity in datastore tuning parameters.

Displays and allows to edit the configured LRU cache capacity via the
datastore tuning parameters.

A step of 1024 is used in the number field for convenience when using
the buttons, more fine grained values can be set by typing.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/pbs-devel/20250404130713.376630-3-c.ebner@proxmox.com
 [TL: address trivial merge conflict from context changes]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Christian Ebner 2025-04-04 15:07:12 +02:00 committed by Thomas Lamprecht
parent f1a711c830
commit 6df6d3094c
2 changed files with 14 additions and 0 deletions

View File

@ -858,6 +858,10 @@ Ext.define('PBS.Utils', {
gc_atime_cutoff = gc_atime_cutoff ?? '1445';
options.push(`${gettext('GC Access Time Cutoff')}: ${gc_atime_cutoff}m`);
let gc_cache_capacity = tuning['gc-cache-capacity'];
delete tuning['gc-cache-capacity'];
options.push(`${gettext('GC cache capacity')}: ${gc_cache_capacity ?? Proxmox.Utils.defaultText}`);
for (const [k, v] of Object.entries(tuning)) {
options.push(`${k}: ${v}`);
}

View File

@ -295,6 +295,16 @@ Ext.define('PBS.Datastore.Options', {
},
deleteEmpty: true,
},
{
xtype: 'proxmoxintegerfield',
name: 'gc-cache-capacity',
fieldLabel: gettext('GC cache capacity'),
emptyText: Proxmox.Utils.defaultText,
minValue: 0,
maxValue: 8192 * 1024,
deleteEmpty: true,
step: 1024,
},
],
},
},