public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup v2 0/5] fix 7642: avoid expensive uid/gid lookups for lock- and config-files
@ 2026-07-01  9:46 Christian Ebner
  2026-07-01  9:46 ` [PATCH proxmox-backup v2 1/5] bin: api: early init proxmox-product-config Christian Ebner
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Christian Ebner @ 2026-07-01  9:46 UTC (permalink / raw)
  To: pbs-devel

As reported by a user in the community forum [0] and the thereof
resulting bugzilla entry [1], phase 2 of garbage collection currently
produces avoidable syscalls and parsing overhead, reading
/etc/nsswitch.conf and /etc/passwd for each per-chunk file locking
call. This is however not limited to garbage collection, but rather
affects file locking in general. The backup_user() lookup was
identified as the culprit.

This patch series fixes this by switching to proxmox-product-config
helpers for config file operations and file locks instead, which does
use the user as parsed once on process init.

[0] https://forum.proxmox.com/threads/s3-gc-phase-2-nsswitch-passwd-overhead.183709/
[1] https://bugzilla.proxmox.com/show_bug.cgi?id=7642

Change since version 1 (thanks @Fabian for feedback):
- Instead of fixing this for S3 file locking only, do it for all
  file locks using the open_backup_lockfile().
- Use proxmox-product-config helpers and init user as required
Note: Above changes significantly escalated the scope of the patches,
as they do now touch any config update as well and in the calling
process the init() must have been called once before.
As the series changed completely, there is no per-patch changelog.

proxmox-backup:

Christian Ebner (5):
  bin: api: early init proxmox-product-config
  bin: daily update: refactor to use proxmox-product-config
  pbs-config: use proxmox-product-config::replace_secret_config()
  pbs-config: use proxmox-product-config::replace_config()
  fix #7642: avoid expensive user lookups on file locking

 pbs-config/Cargo.toml             |  1 +
 pbs-config/src/acl.rs             |  5 ++--
 pbs-config/src/datastore.rs       |  5 ++--
 pbs-config/src/domains.rs         |  5 ++--
 pbs-config/src/drive.rs           |  5 ++--
 pbs-config/src/encryption_keys.rs |  7 ++---
 pbs-config/src/lib.rs             | 44 +++----------------------------
 pbs-config/src/media_pool.rs      |  5 ++--
 pbs-config/src/metrics.rs         |  3 ++-
 pbs-config/src/node.rs            |  3 ++-
 pbs-config/src/notifications.rs   |  8 ++++--
 pbs-config/src/prune.rs           |  5 ++--
 pbs-config/src/remote.rs          |  3 ++-
 pbs-config/src/s3.rs              |  5 ++--
 pbs-config/src/sync.rs            |  5 ++--
 pbs-config/src/tape_job.rs        |  5 ++--
 pbs-config/src/traffic_control.rs |  5 ++--
 pbs-config/src/user.rs            |  5 ++--
 pbs-config/src/verify.rs          |  5 ++--
 src/bin/proxmox-backup-api.rs     |  5 ++--
 src/bin/proxmox-daily-update.rs   | 12 ++++-----
 src/bin/proxmox-tape.rs           |  8 ++++++
 src/config/mod.rs                 |  5 ++--
 src/tape/encryption_keys.rs       |  5 ++--
 24 files changed, 79 insertions(+), 85 deletions(-)


Summary over all repositories:
  24 files changed, 79 insertions(+), 85 deletions(-)

-- 
Generated by murpp 0.11.0




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

end of thread, other threads:[~2026-07-01 14:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01  9:46 [PATCH proxmox-backup v2 0/5] fix 7642: avoid expensive uid/gid lookups for lock- and config-files Christian Ebner
2026-07-01  9:46 ` [PATCH proxmox-backup v2 1/5] bin: api: early init proxmox-product-config Christian Ebner
2026-07-01  9:46 ` [PATCH proxmox-backup v2 2/5] bin: daily update: refactor to use proxmox-product-config Christian Ebner
2026-07-01  9:46 ` [PATCH proxmox-backup v2 3/5] pbs-config: use proxmox-product-config::replace_secret_config() Christian Ebner
2026-07-01  9:46 ` [PATCH proxmox-backup v2 4/5] pbs-config: use proxmox-product-config::replace_config() Christian Ebner
2026-07-01  9:46 ` [PATCH proxmox-backup v2 5/5] fix #7642: avoid expensive user lookups on file locking Christian Ebner
2026-07-01 14:06 ` superseded: [PATCH proxmox-backup v2 0/5] fix 7642: avoid expensive uid/gid lookups for lock- and config-files Christian Ebner

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