From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 4942E1FF13E for ; Wed, 01 Jul 2026 11:51:38 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E41272143C; Wed, 01 Jul 2026 11:51:37 +0200 (CEST) Message-ID: <72bd6ac2-787f-41f5-9a88-75a2c9f94188@proxmox.com> Date: Wed, 1 Jul 2026 11:51:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox-backup 0/4] fix 7642: s3: avoid expensive uid/gid lookups To: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= , pbs-devel@lists.proxmox.com References: <20260601123124.461765-1-c.ebner@proxmox.com> <1781783962.ps1il2f5oc.astroid@yuna.none> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <1781783962.ps1il2f5oc.astroid@yuna.none> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782899481262 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.000 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: AIEH6SXXI57YWTUUVBDCDXQVGWCTT2KY X-Message-ID-Hash: AIEH6SXXI57YWTUUVBDCDXQVGWCTT2KY X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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)? Upon further research I found that there is proxmox-product-config, which already does what is needed globally. So opted to switch over in using that instead where possible. > same for priv_user and backup_group..