public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup 0/4] fix 7642: s3: avoid expensive uid/gid lookups
Date: Mon,  1 Jun 2026 14:31:20 +0200	[thread overview]
Message-ID: <20260601123124.461765-1-c.ebner@proxmox.com> (raw)

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 per-chunk file locking in general. The backup_user() lookup
was identified as the culprit.

This patch series fixes the overhead by only reading the user once at
the start of garbage collection or whenever a s3 backend instance is
created (which already performs the user lookup anyways), storing it
for the rest of the backend lifetime.

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

Christian Ebner (4):
  local datastore cache: combine same module use statements
  datastore/api: s3: wrap s3 client into s3 backend type
  datastore: s3: avoid double calls to rather expensive backup_user()
  fix #7642: s3: avoid repeated user lookup for per-chunk file locking

 pbs-config/src/lib.rs                         |  30 +-
 pbs-datastore/src/backup_info.rs              |  64 +++--
 pbs-datastore/src/chunk_store.rs              |  33 ++-
 pbs-datastore/src/datastore.rs                | 262 +++++++++++-------
 pbs-datastore/src/lib.rs                      |   2 +-
 pbs-datastore/src/local_chunk_reader.rs       |  19 +-
 .../src/local_datastore_lru_cache.rs          |  14 +-
 src/api2/config/datastore.rs                  |  62 ++---
 src/api2/reader/mod.rs                        |  13 +-
 src/backup/verify.rs                          |   4 +-
 src/server/pull.rs                            |  10 +-
 11 files changed, 304 insertions(+), 209 deletions(-)

-- 
2.47.3





             reply	other threads:[~2026-06-01 12:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 12:31 Christian Ebner [this message]
2026-06-01 12:31 ` [PATCH proxmox-backup 1/4] local datastore cache: combine same module use statements Christian Ebner
2026-06-01 12:31 ` [PATCH proxmox-backup 2/4] datastore/api: s3: wrap s3 client into s3 backend type Christian Ebner
2026-06-01 12:31 ` [PATCH proxmox-backup 3/4] datastore: s3: avoid double calls to rather expensive backup_user() Christian Ebner
2026-06-01 12:31 ` [PATCH proxmox-backup 4/4] fix #7642: s3: avoid repeated user lookup for per-chunk file locking 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=20260601123124.461765-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 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