Re: JIT compiling with LLVM v12.2

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-03-30T17:38:08Z
Lists: pgsql-hackers

On March 30, 2018 10:04:25 AM PDT, Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote:
>
>
>On 30.03.2018 18:54, Andres Freund wrote:
>> On 2018-03-30 15:12:05 +0300, Konstantin Knizhnik wrote:
>>> I have repeated performance tests at my computer and find out some
>>> regression comparing with previous JIT version.
>>> Previously JIT provides about 2 times improvement at TPC-H Q1. Now
>the
>>> difference is reduced to 1.4 without parallel execution and 1.3 with
>>> parallel execution:
>> Huh. That's the same computer you did the tests on?
>>
>> There shouldn't have been any, I'll check it out.
>>
>> - Andres
>
>Yes, it is the same computer.
>But sorry, may be it is false alarm.
>I noticed that the time of normal (non-jit) query execution was also 
>faster in the past: for parallel execution 6549 vs. 7550 now, for 
>non-parallel execution 20075 vs. 25100.
>I do not know whether this difference is caused by some changes in 
>Postgres committed since this time (end of January) or just because of 
>different layout of data in memory.

A brief attempt at bisecting would be good. That's quite the regression. Possibly it's OS related though. Meltdown / Spectre?

Andres
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Commits

  1. Improve JIT docs.

  2. Add documentation for the JIT feature.

  3. Add EXPLAIN support for JIT.

  4. Add inlining support to LLVM JIT provider.

  5. JIT tuple deforming in LLVM JIT provider.

  6. Add FIELDNO_* macro designating offset into structs required for JIT.

  7. Add expression compilation support to LLVM JIT provider.

  8. Expand list of synchronized types and functions in LLVM JIT provider.

  9. Add helpers for emitting LLVM IR.

  10. Basic planner and executor integration for JIT.

  11. Debugging and profiling support for LLVM JIT provider.

  12. Support for optimizing and emitting code in LLVM JIT provider.

  13. Add file containing extensions of the LLVM C API.

  14. Basic JIT provider and error handling infrastructure.

  15. Add configure infrastructure (--with-llvm) to enable LLVM support.

  16. Add C++ support to configure.

  17. Add PGAC_PROG_VARCC_VARFLAGS_OPT autoconf macro.

  18. Fix VM buffer pin management in heap_lock_updated_tuple_rec().

  19. Allow tupleslots to have a fixed tupledesc, use in executor nodes.

  20. Expression evaluation based aggregate transition invocation.

  21. Perform slot validity checks in a separate pass over expression.

  22. Rely on executor utils to build targetlist for DML RETURNING.

  23. Refer to OS X as "macOS", except for the port name which is still "darwin".