title

text

Andres  Freund
Andres Freund Citus Data
: December
45 мин

Improving Postgres' Buffer Manager

Postgresql's buffer manager has parts where it's showing its age. We'll discuss how it currently works, what problems there are, and what attempts are in progress to rectify its weaknesses.

  • Lookups in the buffer cache are expensive
  • The buffer mapping table is organized as a hash table, which makes efficient implementations of prefetching, write coalescing, dropping of cache contents hard
  • Relation extension scales badly
  • Cache replacement is inefficient
  • Cache replacement replaces the wrong buffers

Слайды

Видео

Другие доклады

  • Heikki Linnakangas
    Heikki Linnakangas Pivotal

    Index internals

    PostgreSQL includes several index types: GiST, SP-GiST, GIN, and of course, the regular B-tree. DBAs are familiar with using each of these for specific use cases, GIN for full-text search, GiST for geometrical data, and so on, but how do they work internally? What makes them suitable for the cases they're typically used for?

    In this presentation, I will walk through the internal structure of each of these index types, explaining what strengths and weaknesses each one of them have.

  • Алексей Лесовский
    Алексей Лесовский PostgreSQL Consulting LLC
    180 мин
  • Nikolai Shaplov
    Nikolai Shaplov Postgres Professional
    90 мин

  • D
    Dmitry Melnik ИСП РАН
    22 мин

    Speeding up query execution in PostgreSQL using LLVM JIT compiler

    Currently, PostgreSQL uses the interpreter to execute SQL-queries. This yields an overhead caused by indirect calls to handler functions and runtime checks, which could be avoided if the query were compiled into the native code "on-the-fly" (i.e. JIT-compiled): at a run time the specific table structure is known as well as data types used in the query. This is especially important for complex queries, which performance is CPU-bound. At the moment there are two major projects that implement JIT-compilation in PostgreSQL: a commercial database Vitesse DB and an open-source project PGStorm. The former uses LLVM JIT to achieve up to 8x speedup on selected TPC-H benchmarks, while the latter JIT-compiles the query using CUDA and executes it on GPU, which allows to speed up execution of specific query types by an order.

    Our work is dedicated to adding support for SQL query JIT-compilation to PostgreSQL using LLVM compiler infrastructure. In the presentation we'll discuss how JIT-compilation can be used to speed up various stages of query execution in PostgreSQL, and the specifics of translating an SQL query into LLVM bitcode to achieve good performing native code. Also we'll present preliminary results for our JIT-compiler on TPC-H benchmark.