public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup 0/4] fix 7642: s3: avoid expensive uid/gid lookups
Date: Thu, 18 Jun 2026 14:01:38 +0200	[thread overview]
Message-ID: <1781783962.ps1il2f5oc.astroid@yuna.none> (raw)
In-Reply-To: <20260601123124.461765-1-c.ebner@proxmox.com>

On June 1, 2026 2:31 pm, Christian Ebner wrote:
> 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.

couldn't we implement this with less churn, and fix it for *all* call
sites, by caching the resolved user? if it changes during the execution
of our daemon we have a problem anyway, so might as well treat it as
static (initialized in a lazy fashion)?

same for priv_user and backup_group..

> 
> [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
> 
> 
> 
> 
> 
> 




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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 12:31 [PATCH proxmox-backup 0/4] fix 7642: s3: avoid expensive uid/gid lookups Christian Ebner
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
2026-06-18 12:01 ` Fabian Grünbichler [this message]

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=1781783962.ps1il2f5oc.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=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