From: Enrico Plantulli <plantulli@gmail.com>
To: pbs-devel@lists.proxmox.com
Cc: Enrico Plantulli <plantulli@gmail.com>
Subject: [PATCH v2 proxmox 1/3] pbs-api-types: add gc chunk metadata prefetch tuning options
Date: Tue, 11 Aug 2026 11:37:19 +0200 [thread overview]
Message-ID: <20260811093722.735290-2-plantulli@gmail.com> (raw)
In-Reply-To: <20260811093722.735290-1-plantulli@gmail.com>
Add an opt-in option to defer and batch chunk access time updates in
garbage collection phase 1, plus a separate option for the batch size
to ease benchmarking on different storage backends.
Batched updates are flushed sorted by digest, so the chunk directories
involved can be warmed via readdir right before their chunks are
touched. Keeping the switch opt-in follows the review of the first
version of this series: storage backends that do not prefetch inode
metadata on readdir, such as some network attached storages, may see
no benefit or a regression.
Signed-off-by: Enrico Plantulli <plantulli@gmail.com>
---
pbs-api-types/src/datastore.rs | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index 93ccaf0..79ccff9 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -256,6 +256,14 @@ pub const GC_CACHE_CAPACITY_SCHEMA: Schema =
.default(1024 * 1024)
.schema();
+pub const GC_PREFETCH_BATCH_SIZE_SCHEMA: Schema = IntegerSchema::new(
+ "Batch size for deferred chunk access time updates in garbage collection phase 1",
+)
+.minimum(1024)
+.maximum(16 * 1024 * 1024)
+.default(1024 * 1024)
+.schema();
+
#[api(
properties: {
"chunk-order": {
@@ -278,6 +286,18 @@ pub const GC_CACHE_CAPACITY_SCHEMA: Schema =
schema: GC_CACHE_CAPACITY_SCHEMA,
optional: true,
},
+ "gc-chunk-metadata-prefetch": {
+ description:
+ "Defer and batch chunk access time updates in garbage collection phase 1, \
+ warming each chunk directory via readdir right before its chunks are touched",
+ optional: true,
+ default: false,
+ type: bool,
+ },
+ "gc-prefetch-batch-size": {
+ schema: GC_PREFETCH_BATCH_SIZE_SCHEMA,
+ optional: true,
+ },
"default-verification-workers": {
schema: VERIFY_JOB_VERIFY_THREADS_SCHEMA,
optional: true,
@@ -304,6 +324,10 @@ pub struct DatastoreTuning {
#[serde(skip_serializing_if = "Option::is_none")]
pub gc_cache_capacity: Option<usize>,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub gc_chunk_metadata_prefetch: Option<bool>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub gc_prefetch_batch_size: Option<usize>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub default_verification_workers: Option<usize>,
#[serde(skip_serializing_if = "Option::is_none")]
pub default_verification_readers: Option<usize>,
base-commit: e3e3ff11b9b92fe1ace89b84c1e15c150e2db660
--
2.47.3
next prev parent reply other threads:[~2026-08-11 9:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 5:01 [PATCH proxmox proxmox-backup 0/3] datastore: gc: prefetch chunk metadata before phase 1 Enrico Plantulli
2026-08-10 5:01 ` [PATCH proxmox 1/3] pbs-api-types: add gc chunk metadata prefetch tuning option Enrico Plantulli
2026-08-10 5:01 ` [PATCH proxmox-backup 2/3] datastore: gc: optionally prefetch chunk metadata before phase 1 Enrico Plantulli
2026-08-10 10:19 ` Christian Ebner
2026-08-10 15:05 ` Enrico Plantulli
2026-08-10 5:02 ` [PATCH proxmox-backup 3/3] ui: tuning: add GC chunk metadata prefetch option Enrico Plantulli
2026-08-10 10:13 ` [PATCH proxmox proxmox-backup 0/3] datastore: gc: prefetch chunk metadata before phase 1 Christian Ebner
2026-08-10 20:32 ` Enrico Plant
2026-08-11 8:23 ` Christian Ebner
2026-08-11 9:37 ` [PATCH v2 proxmox proxmox-backup 0/3] datastore: gc: defer and batch chunk atime updates Enrico Plantulli
2026-08-11 9:37 ` Enrico Plantulli [this message]
2026-08-14 14:34 ` [PATCH v2 proxmox 1/3] pbs-api-types: add gc chunk metadata prefetch tuning options Christian Ebner
2026-08-11 9:37 ` [PATCH v2 proxmox-backup 2/3] datastore: gc: optionally defer and batch chunk atime updates Enrico Plantulli
2026-08-14 14:34 ` Christian Ebner
2026-08-11 9:37 ` [PATCH v2 proxmox-backup 3/3] ui: tuning: add GC chunk metadata prefetch options Enrico Plantulli
2026-08-14 14:48 ` [PATCH v2 proxmox proxmox-backup 0/3] datastore: gc: defer and batch chunk atime updates Christian Ebner
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=20260811093722.735290-2-plantulli@gmail.com \
--to=plantulli@gmail.com \
--cc=pbs-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