From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, Andreas Joseph Krogh <andreas(at)visena(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Query is over 2x slower with jit=on |
Date: | 2018-09-20 13:07:21 |
Message-ID: | 20180920130721.GM4184@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greetings,
* Andres Freund (andres(at)anarazel(dot)de) wrote:
> On 2018-09-19 23:26:52 -0400, Tom Lane wrote:
> > Andres Freund <andres(at)anarazel(dot)de> writes:
> > > JIT:
> > > Functions: 2
> > > Generation Time: 0.680 ms
> > > Inlining: true
> > > Inlining Time: 7.591 ms
> > > Optimization: true
> > > Optimization Time: 20.522 ms
> > > Emission Time: 14.607 ms
[...]
> > > How about making that:
> > > JIT:
> > > Functions: 2
>
> FWIW, not that I want to do that now, but at some point it might make
> sense to sub-divide this into things like number of "expressions",
> "tuple deforming", "plans", ... Just mentioning that if somebody wants
> to comment on reformatting this as well, if we're tinkering anyway.
I'd actually think we'd maybe want some kind of 'verbose' mode which
shows exactly what got JIT'd and what didn't- one of the questions that
I think people will be asking is "why didn't X get JIT'd?" and I don't
think that's very easy to figure out currently.
> > > Options: Inlining, Optimization
> > > Times (Total, Generation, Inlining, Optimization, Emission): 43.4 ms, 0.680 ms, 7.591 ms, 20.522 ms, 14.607 ms
> >
> > > or something similar?
> >
> > That's going in the right direction. Personally I'd make the last line
> > more like
> >
> > Times: generation 0.680 ms, inlining 7.591 ms, optimization 20.522 ms, emission 14.607 ms, total 43.4 ms
>
> Yea, that's probably easier to read.
I tend to agree that it's easier to read but I'm not sure we need to
quite go that far in reducing the number of rows.
> > (total at the end seems more natural to me, YMMV).
I agree with this..
> I kind of think doing it first is best, because that's usually the first
> thing one wants to know.
and this, so what about:
Times:
generation 0.680 ms, inlining 7.591 ms, optimization 20.522 ms, emission 14.607 ms
Total: 43.4 ms
Gets the total out there quick on the left where you're scanning down
while keeping the detailed info above for reviewing after.
> > Also, the "options" format you suggest here seems a bit too biased
> > towards binary on/off options --- what happens when there's a
> > three-way option? So maybe that line should be like
> >
> > Options: inlining on, optimization on
> >
> > though I'm less sure about that part.
>
> I'm pretty certain you're right :). There's already arguments around
> making optimization more gradual (akin to O1,2,3).
That certainly sounds like it'd be very neat to have though I wonder how
well we'll be able to automatically plan out which optimization level to
use when..
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Travers | 2018-09-20 13:08:34 | Proposal for Signal Detection Refactoring |
Previous Message | Tomas Vondra | 2018-09-20 13:04:57 | Re: fast default vs triggers |