Re: Optimizing PostgreSQL with LLVM's PGO+LTO

From: Andres Freund <andres(at)anarazel(dot)de>
To: João Paulo Labegalini de Carvalho <jaopaulolc(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Optimizing PostgreSQL with LLVM's PGO+LTO
Date: 2023-01-30 17:47:48
Message-ID: 20230130174748.azefznudn2ta2bpu@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-01-30 10:24:02 -0700, João Paulo Labegalini de Carvalho wrote:
> > What compiler / version / flags / OS did you try?
> >
>
> I am running experiment on a machine with:
>
> - Intel(R) Xeon(R) Platinum 8268 CPU @ 2.90GHz
> - Ubuntu 18.04.6 LTS
> - LLVM/Clang 15.0.6 (build from source)
>
> These are the flags I am using:
>
> CFLAGS = -O3 -fuse-ld=lld -gline-tables-only -fprofile-instr-generate
> LDFLAGS = -fuse-ld=lld -Wl,-q

For some reason my notes for using LTO include changing RANLIB to point to
gcc/llvm-ranlib of the appropriate version. Won't even be used on HEAD, but
before that it can make a difference.

Depending on how you built clang, it could be that the above recipe ends up
using the system lld, which might be too old.

What are the crashes you're getting?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2023-01-30 18:40:15 Re: Add n_tup_newpage_upd to pg_stat table views
Previous Message Andres Freund 2023-01-30 17:42:14 Re: meson: Optionally disable installation of test modules