From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id D2ED11FF13A for ; Wed, 08 Jul 2026 11:38:44 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8B4032143F; Wed, 08 Jul 2026 11:38:44 +0200 (CEST) Date: Wed, 08 Jul 2026 11:38:05 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= Subject: Re: [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO To: Dominik Csapak , pdm-devel@lists.proxmox.com, Robert Obkircher , Thomas Lamprecht References: <20260706114822.2751086-1-d.csapak@proxmox.com> <20260706114822.2751086-3-d.csapak@proxmox.com> <1783433095.x62omid41h.astroid@yuna.none> <5b842f53-3059-4ac2-9e7a-4a7a04132ace@proxmox.com> <1783494290.vpra89xkg7.astroid@yuna.none> <1869af1c-2292-4539-9a04-ee0a1cb96b82@proxmox.com> In-Reply-To: <1869af1c-2292-4539-9a04-ee0a1cb96b82@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1783503265.jtzx8yd9xl.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783503480498 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.050 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: P3HYACS64PNKCN62KZ4BVHOAKINIU7GD X-Message-ID-Hash: P3HYACS64PNKCN62KZ4BVHOAKINIU7GD X-MailFrom: f.gruenbichler@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 Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On July 8, 2026 10:44 am, Robert Obkircher wrote: >=20 > On 08.07.26 09:12, Fabian Gr=C3=BCnbichler wrote: >> On July 7, 2026 11:53 pm, Thomas Lamprecht wrote: >>> Am 07.07.26 um 16:06 schrieb Fabian Gr=C3=BCnbichler: >>>> On July 6, 2026 1:44 pm, Dominik Csapak wrote: >>>>> fat LTO merges all LLVM modules into a single unit for optimizing. >>>>> Changing this to thin LTO increases the uncompressed binary size by 1= .59 >>>>> MiB (+11%) (compressed +192KiB/+4.6%) but save us ~160s (-40%) of (wa= ll) >>>>> build time during a 'make deb'. >>>> but what are the effects on runtime performance? the same question als= o >>>> applies to the next patch, a single codegen unit increases the amount = of >>>> optimizations the compiler can do.. >>> FWIW, https://docs.wasmtime.dev/examples-minimal.html states: >>> >>> """ >>> Note that with LTO using a single codegen unit may only have marginal b= enefit. >>> If not using LTO, however, a single codegen unit will likely provide be= nefit over the default 16 codegen units. >>> """ >>> >>> If that (still) holds, we currently do the worst of both worlds compile >>> time wise while not really profiting from this. I'd probably try droppi= ng >>> overriding codegen units first (we do not lower that on performance oth= er >>> (non-wasm) critical code either, e.g. PBS. >> Most perf related documentation seems to say codegen-units=3D1 and LTO= =3Dfat >> are the way to go if you want to optimize for performance, though >> whether that is true for wasm I don't know (the documentation there is >> quite messy/outdated). >> >> AFAIK, it's how projects optimizing for performance build their release >> binaries (i.e., firefox and rustc/cargo upstream both ship their >> binaries built that way - they also tack on profile based optimizations >> for even more gains). Would be interesting to test whether for PBS we'd >> see benefits doing that as well? >> > The drawback is that PGO would make our builds non-reproducible. yeah, I meant just codegen-units=3D1 and lto=3Dfat here. PGO doesn't in general make builds non-reproducible - but the profiles themselves are (usually), which means they need to be generated separate from the build, and tracked/checked-in. that's also the reason distros usually do not enable PGO. there have been some recent experiments with cargo upstream: https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Optimi= zing.20Cargo.20with.20PGO/with/608544658 but for PBS in particular, finding a good benchmark/profiling run will not be easy, since everything is so heavily I/O bound..