This has benchmark results for Postgres 15.8, 16.4 and 17 (beta3, rc1) using sysbench with large and small servers. A recent result for Postgres 17 beta3 from a large server is here. The server in this case is an ax162-s from Hetzner.
This work was done by Small Datum LLC.
tl;dr
- 17rc1 looks great - there are no big regressions and several big improvements
- There might be small regressions (~2%) from Postgres 15 and 16 to 17 but this benchmark was not setup to diagnose that.
Builds, configuration and hardware
I compiled Postgres versions 15.8, 16.4, 17beta3 and 17rc1 from source using -O2 -fno-omit-frame-pointer.
The servers are:
- small
- The server is named v5 or Beelink SER7 here and has 8 AMD cores with SMT disabled, 16G of RAM and uses Ubuntu 22.04 and ext4 with 1 NVMe device.
- large
The configuration files for the large server are in the pg* subdirectories here with the name conf.diff.cx10a_c32r128.
The configuration files for the small server are in the pg* subdirectories here with the name conf.diff.cx10a_c8r32.
Benchmark
I used sysbench and my usage is explained here. There are 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by Postgres.
For the large server the tests run with 8 tables and 10M rows/table. There are 40 client threads, read-heavy microbenchmarks run for 180 seconds and write-heavy run for 300 seconds. The command line to run all tests was: bash r.sh 8 10000000 180 300 md2 1 1 40
For the small server the tests run with 1 tables and 50M rows. There is 1 client thread, read-heavy microbenchmarks run for 180 seconds and write-heavy run for 300 seconds. The command line to run all tests was: bash r.sh 1 50000000 180 300 nvme0n1 1 1 1
Results
For the results below I split the 42 microbenchmarks into 5 groups -- 2 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don't do aggregation while part 2 has queries that do aggregation. The spreadsheet with all data is here. Values from iostat and vmstat divided by QPS are here for the small server and the large server. This can help to explain why something is faster or slower because it shows how much HW is used per request. The numbers in the spreadsheets are the relative QPS. When the relative QPS is > 1 then $version is faster than Postgres 15.8. When it is 3.0 then $version is 3X faster than the base case. The relative QPS is the following where $version is one of 16.4, 17beta3, 17rc1: Results: charts Notes on the charts Point queries, part 1 Point queries, part 2 Range queries, part 1(QPS for $version) / (QPS for Postgres 15.8)
Range queries, part 2 Writes









