From: Pierre Ducroquet <p.psql@pinaraf.info>
To: pgsql-hackers@lists.postgresql.org
Subject: Re: Query is over 2x slower with jit=on
Date: Wed, 22 Aug 2018 20:48:48 +0200
Message-ID: <5943705.ai6g73NumU@pierred-pdoc> (raw)
In-Reply-To: <20180822165155.tjbib4pewnbiyy4x@alap3.anarazel.de>
References: <20180822161241.je6nghzjsktbb57b@alap3.anarazel.de>
<VisenaEmail.27.cb06f4d2cef742ad.165627feef4@tc7-visena>
<20180822165155.tjbib4pewnbiyy4x@alap3.anarazel.de>
On Wednesday, August 22, 2018 6:51:55 PM CEST Andres Freund wrote:
> On 2018-08-22 18:39:18 +0200, Andreas Joseph Krogh wrote:
> > Just to be clear; The query really runs slower (wall-clock time), it's not
> > just the timing.
>
> I bet it's not actually running slower, it "just" takes longer to start
> up due to the JITing in each worker. I suspect what we should do is to
> multiple the cost limits by the number of workers, to model that. But
> without the fixed instrumentation that's harder to see...
It depends on the query. It has been shown in other threads that query can
indeed take longer to run because of JITing : if the cost is too low to fire
LLVM optimizer, the generated code can be so bad it will be slower than the
non-JIT executor.
Cf for instance a previous discussion here : http://www.postgresql-archive.org/PATCH-LLVM-tuple-deforming-improvements-td6029385.html
I think it would be interesting to try the query from this thread with a patch
forcing the LLVM codegen to O1 (I found no PassManager there to play with, it
seems to be an off/on/extreme switch ; patch 0001-LLVM-Use-the-O1-CodeGen-
level.patch from thread mentioned above).
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: p.psql@pinaraf.info, pgsql-hackers@lists.postgresql.org
Subject: Re: Query is over 2x slower with jit=on
In-Reply-To: <5943705.ai6g73NumU@pierred-pdoc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox