Hi, On 2023-01-27 10:05:09 -0700, João Paulo Labegalini de Carvalho wrote: > I am investigating the benefits of different profile-guided optimizations > (PGO) and link-time optimizations (LTO) versus binary optimizers (e.g. > BOLT) for applications such as PostgreSQL. > > I am facing issues when applying LTO to PostgreSQL as the produced binary > seems broken (the server dies quickly after it has started). This is > definitely a compiler bug, but I was wondering if anyone here have > experimented with LTO for PostgreSQL.
What compiler / version / flags / OS did you try? FWIW, I've experimented with LTO and PGO a bunch, both with gcc and clang. I did hit a crash in gcc, but that did turn out to be a compiler bug, and actually reduced to something not even needing LTO. I saw quite substantial speedups with PGO, but I only tested very specific workloads. IIRC it was >15% gain in concurrent readonly pgbench. I dimly recall failing to get some benefit out of bolt for some reason that I unfortunately don't even vaguely recall. Greetings, Andres Freund