From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox{,-backup} v6 00/15] fix #4182: concurrent group pull/push support for sync jobs
Date: Fri, 17 Apr 2026 11:26:06 +0200 [thread overview]
Message-ID: <20260417092621.455374-1-c.ebner@proxmox.com> (raw)
Syncing contents from/to a remote source via a sync job suffers from
low throughput on high latency networks because of limitations by the
HTTP/2 connection, as described in [0]. To improve, syncing multiple
groups in parallel by establishing multiple reader instances has been
suggested.
This patch series implements the functionality by adding the sync job
configuration property `worker-threads`, allowing to define the
number of groups pull/push tokio tasks to be executed in parallel on
the runtime during each job.
Examplary configuration:
```
sync: s-8764c440-3a6c
ns
owner root@pam
remote local
remote-ns
remote-store push-target-store
remove-vanished false
store datastore
sync-direction push
worker-threads 4
```
Since log messages are now also written concurrently, prefix logs
related to groups, snapshots and archives with their respective
context prefix and add context to error messages.
To reduce interwoven log messages from log lines arriving in fast
succession from different group workers, implement a buffer logic to
keep up to 5 lines buffered with a timeout of 1 second. This helps to
follow log lines.
Further, improve logging especially for sync jobs in push direction,
which only displayed limited information so far.
[0] https://bugzilla.proxmox.com/show_bug.cgi?id=4182
Change since version 5 (thanks @Fabian):
- Implement buffered logger for better grouping of fast succession log lines
- Refactor group worker into standalone BoundedJoinSet implementation.
- Improve log output by using better prefixes
- Add missing error contexts
Change since version 4:
- Use dedicated tokio tasks to run in parallel on different runtime threads,
not just multiple concurrent futures on the same thread.
- Rework store progress accounting logic to avoid mutex locks when possible,
use atomic counters instead.
- Expose setting also in the sync job edit window, not just the config.
proxmox:
Christian Ebner (1):
pbs api types: add `worker-threads` to sync job config
pbs-api-types/src/jobs.rs | 11 +++++++++++
1 file changed, 11 insertions(+)
proxmox-backup:
Christian Ebner (14):
tools: group and sort module imports
tools: implement buffered logger for concurrent log messages
tools: add bounded join set to run concurrent tasks bound by limit
client: backup writer: fix upload stats size and rate for push sync
api: config/sync: add optional `worker-threads` property
sync: pull: revert avoiding reinstantiation for encountered chunks map
sync: pull: factor out backup group locking and owner check
sync: pull: prepare pull parameters to be shared across parallel tasks
fix #4182: server: sync: allow pulling backup groups in parallel
server: pull: prefix log messages and add error context
sync: push: prepare push parameters to be shared across parallel tasks
server: sync: allow pushing groups concurrently
server: push: prefix log messages and add additional logging
ui: expose group worker setting in sync job edit window
pbs-client/src/backup_stats.rs | 20 +-
pbs-client/src/backup_writer.rs | 4 +-
pbs-tools/Cargo.toml | 2 +
pbs-tools/src/bounded_join_set.rs | 69 +++++
pbs-tools/src/buffered_logger.rs | 216 ++++++++++++++
pbs-tools/src/lib.rs | 5 +-
src/api2/config/sync.rs | 10 +
src/api2/pull.rs | 9 +-
src/api2/push.rs | 8 +-
src/server/pull.rs | 453 +++++++++++++++++++++---------
src/server/push.rs | 349 ++++++++++++++++++-----
src/server/sync.rs | 40 ++-
www/window/SyncJobEdit.js | 11 +
13 files changed, 978 insertions(+), 218 deletions(-)
create mode 100644 pbs-tools/src/bounded_join_set.rs
create mode 100644 pbs-tools/src/buffered_logger.rs
Summary over all repositories:
14 files changed, 989 insertions(+), 218 deletions(-)
--
Generated by murpp 0.11.0
next reply other threads:[~2026-04-17 9:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 9:26 Christian Ebner [this message]
2026-04-17 9:26 ` [PATCH proxmox v6 01/15] pbs api types: add `worker-threads` to sync job config Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 02/15] tools: group and sort module imports Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 03/15] tools: implement buffered logger for concurrent log messages Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 04/15] tools: add bounded join set to run concurrent tasks bound by limit Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 05/15] client: backup writer: fix upload stats size and rate for push sync Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 06/15] api: config/sync: add optional `worker-threads` property Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 07/15] sync: pull: revert avoiding reinstantiation for encountered chunks map Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 08/15] sync: pull: factor out backup group locking and owner check Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 09/15] sync: pull: prepare pull parameters to be shared across parallel tasks Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 10/15] fix #4182: server: sync: allow pulling backup groups in parallel Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 11/15] server: pull: prefix log messages and add error context Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 12/15] sync: push: prepare push parameters to be shared across parallel tasks Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 13/15] server: sync: allow pushing groups concurrently Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 14/15] server: push: prefix log messages and add additional logging Christian Ebner
2026-04-17 9:26 ` [PATCH proxmox-backup v6 15/15] ui: expose group worker setting in sync job edit window 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=20260417092621.455374-1-c.ebner@proxmox.com \
--to=c.ebner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.