Re: [HACKERS] Just-in-time compiling things (was: asynchronous and vectorized execution)
On Sat, May 14, 2016 at 12:10 PM, Andreas Seltenreichwrote: > Konstantin Knizhnik writes: > >> Latest information from ISP RAS guys: them have made good progress >> since February: them have rewritten most of methods of Scan, Aggregate >> and Join to LLVM API. > > Is their work available somewhere? I'm experimenting in that area as > well, although I'm using libFirm instead of LLVM. I wonder what their > motivation to rewrite backend code in LLVM IR was, since I am following > the approach of keeping the IR around when compiling the vanilla > postgres C code, possibly inlining it during JIT and then doing > optimizations on this IR. That way the logic doesn't have to be > duplicated. I have discussed availability of their work and the consensus was that eventually their code will be open source, but not right now, since it is not ready to be published. I'll meet (after PGCon) their management staff and discuss how we can work together. > > regrads > Andreas > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Just-in-time compiling things
On 05/14/2016 12:10 PM, Andreas Seltenreich wrote: Konstantin Knizhnik writes: Latest information from ISP RAS guys: them have made good progress since February: them have rewritten most of methods of Scan, Aggregate and Join to LLVM API. Is their work available somewhere? I'm experimenting in that area as well, although I'm using libFirm instead of LLVM. I wonder what their motivation to rewrite backend code in LLVM IR was, since I am following the approach of keeping the IR around when compiling the vanilla postgres C code, possibly inlining it during JIT and then doing optimizations on this IR. That way the logic doesn't have to be duplicated. The work is not yet completed but finally it will be definitely put to open source. I am going to talk a little bit about this project at PGcon in Ottawa at lighting talks, although I do not know details of the project myself. The main difference of their approach comparing with Vitesse DB is that them implement a way of automatic conversion of PostgreSQL operators to LLVM IR. So instead of rewritting ~2000 operators manually (a lot of work and errors), them implement converter which transform the code of this operators to ... C++ code producing LLVM IR. So manually them need to rewrite only plan nodes. Them already implemented most of nodes (SeqScan, Sort, HashJoin,...) which allows to execute all TPC-H queries. Result will be published soon. The larghest advantage is definitely at Q1 - about 4 times. It is worser than Vitesse DB (8 times) and with manually written operators (7 times). The most probable reason causing such performance penalty is overflow checking: in manually written LLVM code it can be done in more efficient way using correspondent assembler instruction than in code automatically converted from standard C. But ISP RAS guys are going to fix this problem and improve automatic conversion quality. I include in CC members of ISP RAS team - you can ask them questions directly. regrads Andreas -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Just-in-time compiling things (was: asynchronous and vectorized execution)
Konstantin Knizhnik writes: > Latest information from ISP RAS guys: them have made good progress > since February: them have rewritten most of methods of Scan, Aggregate > and Join to LLVM API. Is their work available somewhere? I'm experimenting in that area as well, although I'm using libFirm instead of LLVM. I wonder what their motivation to rewrite backend code in LLVM IR was, since I am following the approach of keeping the IR around when compiling the vanilla postgres C code, possibly inlining it during JIT and then doing optimizations on this IR. That way the logic doesn't have to be duplicated. regrads Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers