public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [RFC proxmox{, -backup} 0/6] add support for configuring max
@ 2025-09-04 14:37 Hannes Laimer
  2025-09-04 14:37 ` [pbs-devel] [PATCH proxmox 1/2] sys: add wrapper for POSIX semaphores Hannes Laimer
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Hannes Laimer @ 2025-09-04 14:37 UTC (permalink / raw)
  To: pbs-devel

This uses POSIX semaphores to control how many backups run at any given
time. Semaphores seemed like a fitting choice given the problem, so I 
added a basic wrapper for named ones to proxmox-sys. Also, the changes
needed to add concurrency limits in PBS were minimal.

A few questions I still have and would be great to get some feedback on,
 - do we want to use semaphores like proposed here? Are there any good
   reasons not to?
 - should we include things like verify/gc/prune? Would an extra sem for
   reading make sense(so separate limits for r and w, idk if there's a
   use-case)?

Nothing UI-wise is included, and for changes to apply the proxy has to
be restarted. Not sure if restarting the proxy is "ok-ish" ux wise, I
guess not :P But changing it involves re-creating the semaphore, which
is fine, just that there won't exist one for a really short time...


proxmox:

Hannes Laimer (2):
  sys: add wrapper for POSIX semaphores
  pbs-api-types: add concurrency_limit to DataStoreConfig

 pbs-api-types/src/datastore.rs |   5 +
 proxmox-sys/Cargo.toml         |   1 +
 proxmox-sys/src/lib.rs         |   2 +
 proxmox-sys/src/semaphore.rs   | 164 +++++++++++++++++++++++++++++++++
 4 files changed, 172 insertions(+)
 create mode 100644 proxmox-sys/src/semaphore.rs


proxmox-backup:

Hannes Laimer (4):
  api: config: update/delete concurrency_limit on datastore
  Cargo.toml: add 'semaphore' feature to proxmox-sys dep
  bin: proxy: initialize concurrency semaphores for datastores
  api: backup: wait for semaphore if one exists

 Cargo.toml                      |  2 +-
 src/api2/backup/mod.rs          | 24 ++++++++++++++++++++++--
 src/api2/config/datastore.rs    |  9 +++++++++
 src/bin/proxmox-backup-proxy.rs | 11 +++++++++++
 4 files changed, 43 insertions(+), 3 deletions(-)


Summary over all repositories:
  8 files changed, 215 insertions(+), 3 deletions(-)

-- 
Generated by git-murpp 0.8.1


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-04 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-04 14:37 [pbs-devel] [RFC proxmox{, -backup} 0/6] add support for configuring max Hannes Laimer
2025-09-04 14:37 ` [pbs-devel] [PATCH proxmox 1/2] sys: add wrapper for POSIX semaphores Hannes Laimer
2025-09-04 14:37 ` [pbs-devel] [PATCH proxmox 2/2] pbs-api-types: add concurrency_limit to DataStoreConfig Hannes Laimer
2025-09-04 14:37 ` [pbs-devel] [PATCH proxmox-backup 1/4] api: config: update/delete concurrency_limit on datastore Hannes Laimer
2025-09-04 14:37 ` [pbs-devel] [PATCH proxmox-backup 2/4] Cargo.toml: add 'semaphore' feature to proxmox-sys dep Hannes Laimer
2025-09-04 14:37 ` [pbs-devel] [PATCH proxmox-backup 3/4] bin: proxy: initialize concurrency semaphores for datastores Hannes Laimer
2025-09-04 14:37 ` [pbs-devel] [PATCH proxmox-backup 4/4] api: backup: wait for semaphore if one exists Hannes Laimer

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