Pairing LLVM JIT With PostgreSQL Can Speed Up Database Performance
Using the LLVM JIT with PostgreSQL can vastly speed up the query execution performance and shows off much potential but it hasn't been mainlined yet.
Dmitry Melnik presented at this month's LLVM Cauldron over speeding up the query execution performance of PostgreSQL by using LLVM. Particularly with complex queries, the CPU becomes the bottleneck for PostgreSQL rather than the disk. LLVM JIT is used for just-in-time compilation of queries.
Interpretation of Postgres queries can take over half of the execution time (56% is noted in one example) while using LLVM code generation lowered that query down to 6% of execution time.
Results published by the developer show it's possible to get 5~7x speedups on different synthetic tests and TPC-H while automatic code generation was faster by about 10%. This isn't the first time we've seen database developers toy with LLVM to try to significantly speed things up.
More details via these PDF slides or via the Cauldron presentation video embedded below.
Dmitry Melnik presented at this month's LLVM Cauldron over speeding up the query execution performance of PostgreSQL by using LLVM. Particularly with complex queries, the CPU becomes the bottleneck for PostgreSQL rather than the disk. LLVM JIT is used for just-in-time compilation of queries.
Interpretation of Postgres queries can take over half of the execution time (56% is noted in one example) while using LLVM code generation lowered that query down to 6% of execution time.
Results published by the developer show it's possible to get 5~7x speedups on different synthetic tests and TPC-H while automatic code generation was faster by about 10%. This isn't the first time we've seen database developers toy with LLVM to try to significantly speed things up.
More details via these PDF slides or via the Cauldron presentation video embedded below.
3 Comments