Re: JIT compiling with LLVM v12

2018-09-05 Thread Noah Misch
On Wed, Sep 05, 2018 at 11:55:39AM -0700, Andres Freund wrote: > On 2018-08-22 06:20:21 +, Noah Misch wrote: > > I see jit slows the regression tests considerably: > > Is this with LLVM assertions enabled or not? Without, I think. I configured them like this: cmake -G Ninja

Re: JIT compiling with LLVM v12

2018-09-05 Thread Andres Freund
Hi, On 2018-08-22 06:20:21 +, Noah Misch wrote: > I see jit slows the regression tests considerably: Is this with LLVM assertions enabled or not? The differences seem bigger than what I'm observing, especially on the mips animal - which I observe uses a separately installed LLVM build. On

Re: JIT compiling with LLVM v12

2018-09-05 Thread Andres Freund
Hi, On 2018-08-25 21:34:22 -0400, Robert Haas wrote: > On Wed, Aug 22, 2018 at 6:43 PM, Andres Freund wrote: > > Now you can say that'd be solved by bumping the cost up, sure. But > > obviously the row / cost model is pretty much out of whack here, I don't > > see how we can make reasonable

Re: JIT compiling with LLVM v12

2018-08-26 Thread Tels
Moin, On Sat, August 25, 2018 9:34 pm, Robert Haas wrote: > On Wed, Aug 22, 2018 at 6:43 PM, Andres Freund wrote: >> Now you can say that'd be solved by bumping the cost up, sure. But >> obviously the row / cost model is pretty much out of whack here, I don't >> see how we can make reasonable

Re: JIT compiling with LLVM v12

2018-08-26 Thread Fabien COELHO
Now you can say that'd be solved by bumping the cost up, sure. But obviously the row / cost model is pretty much out of whack here, I don't see how we can make reasonable decisions in a trivial query that has a misestimation by five orders of magnitude. Before JIT, it didn't matter whether

Re: JIT compiling with LLVM v12

2018-08-25 Thread Robert Haas
On Wed, Aug 22, 2018 at 6:43 PM, Andres Freund wrote: > Now you can say that'd be solved by bumping the cost up, sure. But > obviously the row / cost model is pretty much out of whack here, I don't > see how we can make reasonable decisions in a trivial query that has a > misestimation by five

Re: JIT compiling with LLVM v12

2018-08-25 Thread Noah Misch
On Wed, Aug 22, 2018 at 06:20:21AM +, Noah Misch wrote: > On Wed, Mar 28, 2018 at 02:27:51PM -0700, Andres Freund wrote: > > For now LLVM is enabled by default when compiled --with-llvm. I'm mildly > > inclined to leave it like that until shortly before the release, and > > then disable it by

Re: JIT compiling with LLVM v12

2018-08-22 Thread Andres Freund
Hi, On 2018-08-22 18:15:29 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-08-22 06:20:21 +, Noah Misch wrote: > >> Regardless of the choice of jit={on|off} default, these numbers tell me > >> that > >> some or all of jit_*_cost defaults are too low. > > > I don't think it really

Re: JIT compiling with LLVM v12

2018-08-22 Thread Tom Lane
Andres Freund writes: > On 2018-08-22 06:20:21 +, Noah Misch wrote: >> Regardless of the choice of jit={on|off} default, these numbers tell me that >> some or all of jit_*_cost defaults are too low. > I don't think it really shows that. The reason that JITing gets started > there is that the

Re: JIT compiling with LLVM v12

2018-08-22 Thread Peter Eisentraut
On 22/08/2018 16:54, Andres Freund wrote: > I don't see particularly much benefit in deciding before beta, > personally. What's making you think it'd be important to decide before? > Pretty fundamentally, it'll be a setting you don't know is effectively > on, for the forseeable future anyway?

Sv: Re: JIT compiling with LLVM v12

2018-08-22 Thread Andreas Joseph Krogh
På onsdag 22. august 2018 kl. 16:36:00, skrev Peter Eisentraut < peter.eisentr...@2ndquadrant.com >: On 22/08/2018 08:20, Noah Misch wrote: > Regardless of the choice of jit={on|off} default, these numbers tell me that > some or all of jit_*_cost defaults

Re: JIT compiling with LLVM v12

2018-08-22 Thread Andres Freund
Hi, On 2018-08-22 16:36:00 +0200, Peter Eisentraut wrote: > I'm suspicious that we haven't had much feedback about this. We've > heard of one or two cases where LLVM broke a query outright, and that > was fixed and that was a good result. But we haven't heard anything > about performance

Re: JIT compiling with LLVM v12

2018-08-22 Thread Peter Eisentraut
On 22/08/2018 08:20, Noah Misch wrote: > Regardless of the choice of jit={on|off} default, these numbers tell me that > some or all of jit_*_cost defaults are too low. That was also my earlier analysis. I'm suspicious that we haven't had much feedback about this. We've heard of one or two cases

Re: JIT compiling with LLVM v12

2018-08-22 Thread Andres Freund
On 2018-08-22 06:20:21 +, Noah Misch wrote: > On Wed, Mar 28, 2018 at 02:27:51PM -0700, Andres Freund wrote: > > For now LLVM is enabled by default when compiled --with-llvm. I'm mildly > > inclined to leave it like that until shortly before the release, and > > then disable it by default

Re: JIT compiling with LLVM v12

2018-08-22 Thread Noah Misch
On Wed, Mar 28, 2018 at 02:27:51PM -0700, Andres Freund wrote: > For now LLVM is enabled by default when compiled --with-llvm. I'm mildly > inclined to leave it like that until shortly before the release, and > then disable it by default (i.e. change the default of jit=off). But I > think we can

Re: JIT compiling with LLVM v12

2018-03-29 Thread Jesper Pedersen
Hi, On 03/29/2018 11:03 AM, Pierre Ducroquet wrote: Clang is needed to emit the LLVM bitcode required for inlining. The "-emit- llvm" flag is used for that. A dual compilation is required for inlining to work, one compilation with gcc/clang/msvc/… to build the postgresql binary, one with clang

Re: JIT compiling with LLVM v12

2018-03-29 Thread Pierre Ducroquet
On Thursday, March 29, 2018 2:39:17 PM CEST Jesper Pedersen wrote: > Hi Andres, > > On 03/28/2018 05:27 PM, Andres Freund wrote: > > On 2018-03-27 10:34:26 -0700, Andres Freund wrote: > >> On 2018-03-27 10:05:47 -0400, Peter Eisentraut wrote: > >>> On 3/13/18 19:40, Andres Freund wrote: >

Re: JIT compiling with LLVM v12

2018-03-29 Thread Jesper Pedersen
Hi Andres, On 03/28/2018 05:27 PM, Andres Freund wrote: On 2018-03-27 10:34:26 -0700, Andres Freund wrote: On 2018-03-27 10:05:47 -0400, Peter Eisentraut wrote: On 3/13/18 19:40, Andres Freund wrote: I've pushed a revised and rebased version of my JIT patchset. What is the status of this

Re: JIT compiling with LLVM v12

2018-03-28 Thread Amit Langote
On 2018/03/29 9:35, Michael Paquier wrote: > On Wed, Mar 28, 2018 at 06:24:53PM -0400, David Steele wrote: >> On 3/28/18 6:09 PM, Andres Freund wrote: >>> Hah! Happy to, if there's enough people interested. I've a talk about >>> it too (state of jit, 2018 edition), but I wasn't planning to go

Re: JIT compiling with LLVM v12

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 06:24:53PM -0400, David Steele wrote: > On 3/28/18 6:09 PM, Andres Freund wrote: >> Hah! Happy to, if there's enough people interested. I've a talk about >> it too (state of jit, 2018 edition), but I wasn't planning to go into >> too low level details. More about what is

Re: JIT compiling with LLVM v12

2018-03-28 Thread David Steele
On 3/28/18 6:09 PM, Andres Freund wrote: On 2018-03-28 18:06:24 -0400, Peter Eisentraut wrote: On 3/28/18 17:27, Andres Freund wrote: I've pushed these three. Great, now the only thing remaining is to prepare an unconference session explaining all this to the rest of us. ;-) Hah! Happy

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 18:06:24 -0400, Peter Eisentraut wrote: > On 3/28/18 17:27, Andres Freund wrote: > > I've pushed these three. > > Great, now the only thing remaining is to prepare an unconference > session explaining all this to the rest of us. ;-) Hah! Happy to, if there's enough people

Re: JIT compiling with LLVM v12

2018-03-28 Thread Peter Eisentraut
On 3/28/18 17:27, Andres Freund wrote: > I've pushed these three. Great, now the only thing remaining is to prepare an unconference session explaining all this to the rest of us. ;-) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 14:27:51 -0700, Andres Freund wrote: > > 7/10 committed. Inlining, Explain, Docs remain. > > I've pushed these three. One tiny pending commit I have is to add a few pg_noinline annotations to slow-path functions, to avoid very common spurious inlines. I'll play a littlebit

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
On 2018-03-27 10:34:26 -0700, Andres Freund wrote: > On 2018-03-27 10:05:47 -0400, Peter Eisentraut wrote: > > On 3/13/18 19:40, Andres Freund wrote: > > > I've pushed a revised and rebased version of my JIT patchset. > > > > What is the status of this item as far as the commitfest is concerned?

Re: JIT compiling with LLVM v12

2018-03-27 Thread Andres Freund
On 2018-03-27 10:05:47 -0400, Peter Eisentraut wrote: > On 3/13/18 19:40, Andres Freund wrote: > > I've pushed a revised and rebased version of my JIT patchset. > > What is the status of this item as far as the commitfest is concerned? 7/10 committed. Inlining, Explain, Docs remain. Greetings,