From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 3/3] GC: S3: phase2: delete last partial batch of objects at the very end
Date: Fri, 21 Nov 2025 10:06:01 +0100 [thread overview]
Message-ID: <20251121090605.262675-4-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20251121090605.262675-1-f.gruenbichler@proxmox.com>
instead of after every processing every batch of 1000 listed objects. this
reduces the number of delete calls made to the backend, making regular garbage
collections that do not delete most objects cheaper, but means holding the
flocks for garbage chunks/objects longer.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
pbs-datastore/src/datastore.rs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index f89fd28b0..f26de672a 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -1745,12 +1745,6 @@ impl DataStore {
s3_delete_batch(&mut delete_list, s3_client)?;
}
}
-
- // delete the last batch of objects, if there are any remaining
- if !delete_list.is_empty() {
- s3_delete_batch(&mut delete_list, s3_client)?;
- }
-
// Process next batch of chunks if there is more
if list_bucket_result.is_truncated {
list_bucket_result =
@@ -1763,6 +1757,12 @@ impl DataStore {
break;
}
+
+ // delete the last batch of objects, if there are any remaining
+ if !delete_list.is_empty() {
+ s3_delete_batch(&mut delete_list, s3_client)?;
+ }
+
info!("processed {chunk_count} total chunks");
// Phase 2 GC of Filesystem backed storage is phase 3 for S3 backed GC
--
2.47.3
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-11-21 9:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 9:05 [pbs-devel] [PATCH proxmox-backup 0/3] reduce GC S3 locking Fabian Grünbichler
2025-11-21 9:05 ` [pbs-devel] [PATCH proxmox-backup 1/3] GC: S3: reduce number of open FDs for to-be-deleted objects Fabian Grünbichler
2025-11-21 9:43 ` Christian Ebner
2025-11-21 9:06 ` [pbs-devel] [PATCH proxmox-backup 2/3] GC: S3: factor out batch object deletion Fabian Grünbichler
2025-11-21 9:06 ` Fabian Grünbichler [this message]
2025-11-21 9:31 ` [pbs-devel] [PATCH proxmox-backup 3/3] GC: S3: phase2: delete last partial batch of objects at the very end Christian Ebner
2025-11-21 9:46 ` Fabian Grünbichler
2025-11-21 9:53 ` Christian Ebner
2025-11-21 10:05 ` [pbs-devel] [PATCH proxmox-backup 0/3] reduce GC S3 locking Christian Ebner
2025-11-21 10:19 ` [pbs-devel] superseded: " Fabian Grünbichler
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=20251121090605.262675-4-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.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