pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Luis Carril <luis.carril@swarm64.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: JIT overhead slowdown
Date: Thu, 14 Feb 2019 15:03:34 -0600
Message-ID: <20190214210334.GA1732@telsasoft.com> (raw)
In-Reply-To: <LEXPR01MB098999F9AA40877D4A6F87E4E79C0@LEXPR01MB0989.DEUPRD01.PROD.OUTLOOK.DE> <20190118164254.p3p6gogijf3dh7q6@alap3.anarazel.de> <LEXPR01MB09897821BA2CDDB70225EF7BE79C0@LEXPR01MB0989.DEUPRD01.PROD.OUTLOOK.DE>

Hi,

On Fri, Jan 18, 2019 at 02:12:23PM +0000, Luis Carril wrote:
>     we noticed that in the presence of a schema with many partitions the jitting overhead penalizes the total query execution time so much that the planner should have decided not to jit at all. For example without jitting we go a 8.3 s execution time and with jitting enabled 13.8 s.
...
> Is this behavior expected? Is the cost function for jitting missing some circumstances?

On Fri, Jan 18, 2019 at 08:42:54AM -0800, Andres Freund wrote:
> The costing doesn't take the effect of overhead of repeated JITing in
> each worker into account.  I could give you a test patch that does, if
> you want to play around with it?

On Fri, Jan 18, 2019 at 06:02:43PM +0000, Luis Carril wrote:
>  yes please it would be much apreciated.

I'm also interested to try that ; on re-enabling JIT in 11.2, I see that JITed
queries seem to be universally slower than non-JIT.

I found that was discussed here:
https://www.postgresql.org/message-id/20180822161241.je6nghzjsktbb57b%40alap3.anarazel.de
https://www.postgresql.org/message-id/20180624203633.uxirvmigzdhcyjsd%40alap3.anarazel.de

Multiplying JIT cost by nworkers seems like an obvious thing to try, but I
wondered whether it's really correct?  Certainly repeated JITing takes N times
more CPU time, but doesn't make the query slower...unless the CPU resources are
starved and limiting ?

Justin




view thread (4+ messages)

Message-ID: <20190214210334.GA1732@telsasoft.com>
Permalink:  ../20190214210334.GA1732@telsasoft.com/
Also on:    postgresql.org/message-id/20190214210334.GA1732@telsasoft.com

 · 

reply

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-performance@postgresql.org
  Cc: pryzby@telsasoft.com, luis.carril@swarm64.com, andres@anarazel.de, pgsql-performance@lists.postgresql.org
  Subject: Re: JIT overhead slowdown
  In-Reply-To: <20190214210334.GA1732@telsasoft.com>

* 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