Intel Demonstrates Up To 48% Improvement For AVX-512 Optimized PostgreSQL

Written by Michael Larabel in Intel on 12 September 2024 at 07:43 AM EDT. 45 Comments
INTEL
With the upcoming PostgreSQL 17 database server release there is some initial AVX-512 optimizations that are looking quite nice according to Intel's findings.

Since earlier this year there's been a pg_popcount() optimized for AVX-512:
"Optimize pg_popcount() with AVX-512 instructions.

Presently, pg_popcount() processes data in 32-bit or 64-bit chunks when possible. Newer hardware that supports AVX-512 instructions can use 512-bit chunks, which provides a nice speedup, especially for larger buffers. This commit introduces the infrastructure required to detect compiler and CPU support for the required AVX-512 intrinsic functions, and it adds a new pg_popcount() implementation that uses these functions. If CPU support for this optimized implementation is detected at runtime, a function pointer is updated so that it is used by subsequent calls to pg_popcount()."

Intel has published a technical paper exploring that PostgreSQL AVX-512 optimized pop count implementation. Intel engineers found as much as a 46~48% performance improvement with PostgreSQL's bit_count() function. Here is the Intel finding over AVX-512 gains for PostgreSQL bit counting on their Xeon processors on-premise and in the cloud:

Intel shows off AVX-512 PostgreSQL improvement


Those wanting to learn more about Intel's findings around this initial AVX-512 usage for PostgreSQL can find the paper on Intel.com.

In case you missed it PostgreSQL this summer also rolled out up to 4x query performance with SIMD-optimized JSON escaping.

Separately there is also a proposal from Intel for AVX-512 CRC32C usage within PostgreSQL.

It's great seeing continued new areas where AVX-512 is paying nice dividends for performance from speedy JSON parsing to databases.

PostgrSQL 17 with this AVX-512 bit counting and many other new features is currently up to its release candidate phase. PostgreSQL 17.0 stable should be out as soon as later this month.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week