public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>,
	Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v3] etc: raise nofile soft limit to hard limit for proxmox-backup-proxy
Date: Fri, 21 Nov 2025 10:07:21 +0100	[thread overview]
Message-ID: <1763716007.031myu8tx7.astroid@yuna.none> (raw)
In-Reply-To: <5ac9259a-1c84-4a24-9be9-6e9bb987093f@proxmox.com>

On November 21, 2025 9:00 am, Christian Ebner wrote:
> On 11/21/25 8:42 AM, Fabian Grünbichler wrote:
>> - reduce the batch size (which determines the number of concurrently
>>    held locks in GC) for S3 deletion
> 
> exactly what came to my mind as well :)
> 
>> 
>> the latter would be a fairly simple patch, but make GC potentially a bit
>> more expensive (more delete requests to S3):
>> 
>> diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
>> index 0a5179230..20372190c 100644
>> --- a/pbs-datastore/src/datastore.rs
>> +++ b/pbs-datastore/src/datastore.rs
>> @@ -1716,6 +1716,24 @@ impl DataStore {
>>                       }
>>   
>>                       chunk_count += 1;
>> +
>> +                    drop(_guard);
>> +
>> +                    if delete_list.len() > 100 {
>> +                        let delete_objects_result = proxmox_async::runtime::block_on(
>> +                            s3_client.delete_objects(
>> +                                &delete_list
>> +                                    .iter()
>> +                                    .map(|(key, _)| key.clone())
>> +                                    .collect::<Vec<S3ObjectKey>>(),
>> +                            ),
>> +                        )?;
>> +                        if let Some(_err) = delete_objects_result.error {
>> +                            bail!("failed to delete some objects");
>> +                        }
>> +                        // release all chunk guards
>> +                        delete_list.clear();
>> +                    }
>>                   }
>>   
>>                   if !delete_list.is_empty() {
> 
> Since you already have it in place, do you want to send this patch?
> 
> My initial draft was still a bit less efficient than this as I did 
> already batch the list object response.
> 
> Only thing I still see missing in your patch is to make the 100 a 
> constant and set the capacity for the delete list using that on 
> instantiation as well.

sent as three-patch series:

https://lore.proxmox.com/pbs-devel/20251121090605.262675-1-f.gruenbichler@proxmox.com/T/#t


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

      parent reply	other threads:[~2025-11-21  9:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 14:31 Christian Ebner
2025-11-20 15:05 ` Thomas Lamprecht
2025-11-20 15:12   ` Christian Ebner
2025-11-20 17:23     ` Thomas Lamprecht
2025-11-21  7:02       ` Christian Ebner
2025-11-21  7:43       ` Fabian Grünbichler
2025-11-21  8:00         ` Christian Ebner
2025-11-21  9:06           ` Fabian Grünbichler
2025-11-21  9:07           ` Fabian Grünbichler [this message]

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=1763716007.031myu8tx7.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=t.lamprecht@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