Re: JIT compiling with LLVM v11

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JIT compiling with LLVM v11
Date: 2018-03-09 20:42:24
Message-ID: 98869aa9-0ffc-530b-2b28-6de6625a45b7@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/6/18 10:29, Peter Eisentraut wrote:
> I think taking the total cost as the triggering threshold is probably
> good enough for a start. The cost modeling can be refined over time.

I looked into this a bit more.

The default of jit_above_cost = 500000 seems pretty good. I constructed
a query that cost about 450000 where the run time with and without JIT
were about even. This is obviously very limited testing, but it's a
good start.

For jit_optimize_above_cost, in my testing, any query where JIT payed
off was even faster with optimizing. So right now I don't see a need to
make this a separate setting. Maybe just make it an on/off setting for
experimenting.

For inlining, I haven't been able to get a clear picture. It's a bit
faster perhaps, but the optimizing dominates it. I don't have a clear
mental model for what kind of returns to expect from this.

What I'd quite like is if EXPLAIN or EXPLAIN ANALYZE showed something
about what kind of JIT processing was done, if any, to help with this
kind of testing.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-03-09 20:56:18 Re: JIT compiling with LLVM v11
Previous Message Alvaro Herrera 2018-03-09 20:41:43 Re: FOR EACH ROW triggers on partitioned tables