From: Christian Ebner <c.ebner@proxmox.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>,
pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup 0/4] fix 7642: s3: avoid expensive uid/gid lookups
Date: Tue, 23 Jun 2026 12:28:51 +0200 [thread overview]
Message-ID: <12cb3da0-9228-4036-aa95-4a4ccc2b850b@proxmox.com> (raw)
In-Reply-To: <1781783962.ps1il2f5oc.astroid@yuna.none>
On 6/18/26 2:00 PM, Fabian Grünbichler wrote:
> 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..
Yes, will implement it as such then: Was unsure if acceptable to break
with the assumption that this is no longer read on-demand, so opted for
the less invasive approach.
But reading on-demand would be racy anyways and I see no further reason
why this should not be treated as statically initialized.
Will adapt accordingly and send a new version.
Thanks for your feedback!
prev parent reply other threads:[~2026-06-23 10:29 UTC|newest]
Thread overview: 7+ 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 ` [PATCH proxmox-backup 0/4] fix 7642: s3: avoid expensive uid/gid lookups Fabian Grünbichler
2026-06-23 10:28 ` Christian Ebner [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=12cb3da0-9228-4036-aa95-4a4ccc2b850b@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=f.gruenbichler@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.