public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Robert Obkircher <r.obkircher@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH v1 proxmox-backup] api: do not block tokio worker threads during chunk inserts
Date: Wed, 27 May 2026 18:12:08 +0200	[thread overview]
Message-ID: <66def9af-7504-441a-b605-6705f76fb047@proxmox.com> (raw)
In-Reply-To: <20260527123809.238964-1-r.obkircher@proxmox.com>

On 5/27/26 2:37 PM, Robert Obkircher wrote:
> Move synchronous operations off the worker threads to prevent blocking
> the I/O and timer drivers of the entire runtime. This is especially
> important for S3 uploads, which wait up to 3 hours for the chunk lock.
> 
> Also prevent worker starvation, which could happen because S3 uploads
> are wrapped in proxmox_async::runtime::block_on, which prevents other
> futures from running in the current thread.
> 
> In the backtrace from the linked forum post, two workers were waiting
> for chunk locks (presumably due to duplicates) while the remaining 19
> were stuck because block_on called std::thread::park.
> 
> Fixes: https://forum.proxmox.com/threads/183705
> Signed-off-by: Robert Obkircher <r.obkircher@proxmox.com>
> ---

Gave this patch a spin, changes look good to me although a second pair 
of eyes is highly appreciated given the scope.

In order to look for performance regressions, I did also some basic 
benchmarks:

Performed backups of a linux kernel git repo with size 11.488 GiB
(compressed 9.96 GiB).
For each patch state and target datastore, performed 5 runs removing the
backup snapshot again after each run to force re-upload of chunks, but
left chunk in store to avoid overhead of insert/upload. In-memory state
cleared after each run by restarting proxmox-backup-proxy.service.
delta RSS was obtained by taking difference of max and min value of
output as reported by:
`watch -n 1 "ps -p $(pidof proxmox-backup-proxy) -o rss | tail -n 1 | 
tee -a ps-rss.out"`

Regular datastore and S3 store backed by Ceph RGW using a local 
datastore cache on virtualized

regular datastore - unpatched
-----------------------------
runtime (s)  | delta RSS (KiB)
25.24 ± 0.09 | 31772
-----------------------------

S3 datastore - unpatched
-----------------------------
runtime (s)  | delta RSS (KiB)
25.19 ± 0.14 | 28072
-----------------------------

regular datastore - patched
-----------------------------
runtime (s)  | delta RSS (KiB)
25.28 ± 0.08 | 26184
-----------------------------

S3 datastore - patched
-----------------------------
runtime (s)  | delta rss (KiB)
25.42 ± 0.15 | 35024
-----------------------------

Consider:

Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>




  reply	other threads:[~2026-05-27 16:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 12:37 [PATCH v1 proxmox-backup] api: do not block tokio worker threads during chunk inserts Robert Obkircher
2026-05-27 16:12 ` Christian Ebner [this message]
2026-05-29 10:22 ` applied: " Thomas Lamprecht

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=66def9af-7504-441a-b605-6705f76fb047@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=r.obkircher@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