PostgreSQL pgbench

This is a simple benchmark of PostgreSQL using pgbench.

To run this test with the Phoronix Test Suite, the basic command is: phoronix-test-suite benchmark pgbench.

Project Site

postgresql.org

Test Created

6 December 2010

Last Updated

26 September 2024

Test Maintainer

Michael Larabel 

Test Type

System

Average Install Time

1 Minute, 26 Seconds

Average Run Time

5 Minutes, 37 Seconds

Test Dependencies

C/C++ Compiler Toolchain + BC

Accolades

400k+ Downloads + 10k+ Public Benchmark Results

Supported Platforms


Public Result Uploads *Reported Test Completions **Reported Installs **Test Profile Page Views ***OpenBenchmarking.orgEventsPostgreSQL pgbench Popularity Statisticspts/pgbench2010.122011.052011.102012.032012.082013.012013.062013.112014.042014.092015.022015.072015.122016.052016.102017.032017.082018.012018.062018.112019.042019.092020.022020.072020.122021.052021.102022.032022.082023.012023.062023.112024.042024.09400K800K1200K1600K2000K
* Uploading of benchmark result data to OpenBenchmarking.org is always optional (opt-in) via the Phoronix Test Suite for users wishing to share their results publicly.
** Data based on those opting to upload their test results to OpenBenchmarking.org and users enabling the opt-in anonymous statistics reporting while running benchmarks from an Internet-connected platform.
*** Test profile page view reporting began March 2021.
Data updated weekly as of 28 December 2024.
10045.1%124.0%100030.9%Scaling Factor Option PopularityOpenBenchmarking.org
25012.5%50020.9%100034.0%80032.7%Clients Option PopularityOpenBenchmarking.org
Read Only49.9%Read Write50.1%Mode Option PopularityOpenBenchmarking.org

Revision History

pts/pgbench-1.15.0   [View Source]   Thu, 26 Sep 2024 15:44:13 GMT
Update against PostgreSQL 17 upsteam. Also check for libicu dependency. Closes: https://github.com/phoronix-test-suite/phoronix-test-suite/pull/813

pts/pgbench-1.14.0   [View Source]   Thu, 14 Sep 2023 16:25:36 GMT
Update against PostgreSQL 16 upstream.

pts/pgbench-1.13.0   [View Source]   Thu, 05 Jan 2023 18:30:08 GMT
Make use of PostgreSQL prepared mode for pgbench, add higher client options.

pts/pgbench-1.12.0   [View Source]   Thu, 13 Oct 2022 11:20:45 GMT
Update against PostgreSQL 15 upstream.

pts/pgbench-1.11.1   [View Source]   Tue, 11 Jan 2022 14:32:09 GMT
Allow a scaling factor up to 25,000.

pts/pgbench-1.11.0   [View Source]   Thu, 30 Sep 2021 15:06:31 GMT
Update against PostgreSQL 14.0 upstream, various tuning improvements too.

pts/pgbench-1.10.2   [View Source]   Sat, 24 Jul 2021 18:40:45 GMT
Increase time -T option to 90, oversight that it wasn't bumped higher in more recent years.

pts/pgbench-1.10.1   [View Source]   Thu, 24 Sep 2020 14:41:34 GMT
Settings tweak for the 1.10.0 changes.

pts/pgbench-1.10.0   [View Source]   Thu, 24 Sep 2020 12:11:09 GMT
Update against PostgreSQL 13.0 upstream, restructure test option handling.

pts/pgbench-1.9.1   [View Source]   Fri, 04 Oct 2019 06:53:32 GMT
Fix heavy contentiob by going off physical CPU cores.

pts/pgbench-1.9.0   [View Source]   Thu, 03 Oct 2019 09:57:40 GMT
Update against PostgreSQL 12.0. NOTE: still waiting on official Windows postgresql 12 release binaries.

pts/pgbench-1.8.7   [View Source]   Fri, 29 Mar 2019 03:20:12 GMT
Update download URLs.

pts/pgbench-1.8.6   [View Source]   Fri, 07 Dec 2018 12:47:49 GMT
Enable BSD build support.

pts/pgbench-1.8.5   [View Source]   Fri, 07 Sep 2018 09:43:34 GMT
Add bc as an external dependency.

pts/pgbench-1.8.4   [View Source]   Sun, 25 Mar 2018 13:10:40 GMT
Fix the bundled patch allowing PostgreSQL to run as root.

pts/pgbench-1.8.3   [View Source]   Thu, 22 Mar 2018 18:07:18 GMT
Adjust run count as was bumped lower during debugging.

pts/pgbench-1.8.2   [View Source]   Thu, 22 Mar 2018 18:06:30 GMT
Create db directory on Windows otherwise the test seems to sometimes fail, also add note about MSVCR120.dll needing to be on system for PostgreSQL to work.

pts/pgbench-1.8.1   [View Source]   Thu, 01 Mar 2018 11:46:17 GMT
Tidy up the Windows support, appears to be good to go.

pts/pgbench-1.8.0   [View Source]   Thu, 01 Mar 2018 11:26:11 GMT
Update against upstream PostgreSQL 10.3, add initial Windows bits.

pts/pgbench-1.7.0   [View Source]   Sat, 14 Oct 2017 15:23:03 GMT
Updating against postgresql 10.0

pts/pgbench-1.6.0   [View Source]   Fri, 19 May 2017 11:57:32 GMT
Update against upstream PostgreSQL 9.6.3.

pts/pgbench-1.5.2   [View Source]   Thu, 08 Oct 2015 16:05:08 GMT
Update download links, advertise BSD compatibility.

pts/pgbench-1.5.1   [View Source]   Tue, 09 Jun 2015 21:16:09 GMT
Hack up pgbench to let it run as root

pts/pgbench-1.5.0   [View Source]   Tue, 09 Jun 2015 20:05:58 GMT
Major update/overhaul of pgbench PostgreSQL benchmark.

pts/pgbench-1.4.0   [View Source]   Wed, 11 Apr 2012 10:15:04 GMT
Move back to older PostgreSQL 8.4.11 upstream server version to work around PostgreSQL 9.x issue right now dealing with the plpg

pts/pgbench-1.3.0   [View Source]   Sat, 27 Aug 2011 16:23:30 GMT
Update PostgreSQL to version 9.0.4.

pts/pgbench-1.2.0   [View Source]   Mon, 06 Dec 2010 15:16:36 GMT
Initial import into OpenBenchmarking.org

Suites Using This Test

Database Test Suite

C/C++ Compiler Tests

Server

Common Kernel Benchmarks

Multi-Core

CPU Massive


Performance Metrics

Analyze Test Configuration:

PostgreSQL 17

Scaling Factor: 1 - Clients: 1 - Mode: Read Write

OpenBenchmarking.org metrics for this test profile configuration based on 10 public results since 3 October 2024 with the latest data as of 23 December 2024.

Additional benchmark metrics will come after OpenBenchmarking.org has collected a sufficient data-set.

OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 1 - Clients: 1 - Mode: Read Write10 Results Range From 312 To 6623 TPS312439566693820947107412011328145515821709183619632090221723442471259827252852297931063233336034873614374138683995412242494376450346304757488450115138526553925519564657735900602761546281640865356662246810

Based on OpenBenchmarking.org data, the selected test / test configuration (PostgreSQL 17 - Scaling Factor: 1 - Clients: 1 - Mode: Read Write) has an average run-time of 9 minutes. By default this test profile is set to run at least 3 times but may increase if the standard deviation exceeds pre-defined defaults or other calculations deem additional runs necessary for greater statistical accuracy of the result.

OpenBenchmarking.orgMinutesTime Required To Complete BenchmarkScaling Factor: 1 - Clients: 1 - Mode: Read WriteRun-Time510152025Min: 7 / Avg: 9.11 / Max: 20

Based on public OpenBenchmarking.org results, the selected test / test configuration has an average standard deviation of 0.6%.

OpenBenchmarking.orgPercent, Fewer Is BetterAverage Deviation Between RunsScaling Factor: 1 - Clients: 1 - Mode: Read WriteDeviation246810Min: 0 / Avg: 0.56 / Max: 2

Notable Instruction Set Usage

Notable instruction set extensions supported by this test, based on an automatic analysis by the Phoronix Test Suite / OpenBenchmarking.org analytics engine.

Instruction Set
Support
Instructions Detected
Last automated analysis: 16 October 2024

This test profile binary relies on the shared libraries libc.so.6.

Tested CPU Architectures

This benchmark has been successfully tested on the below mentioned architectures. The CPU architectures listed is where successful OpenBenchmarking.org result uploads occurred, namely for helping to determine if a given test is compatible with various alternative CPU architectures.

CPU Architecture
Kernel Identifier
Verified On
Intel / AMD x86 64-bit
x86_64
(Many Processors)

Recent Test Results

OpenBenchmarking.org Results Compare

3 Systems - 157 Benchmark Results

INTEL XEON GOLD 5512U - Supermicro Super Server 0123456789 - 256GB

FreeBSD - 14.1-RELEASE - Clang 18.1.5

1 System - 4 Benchmark Results

AMD EPYC 9B14 - Google Compute Engine c3d-standard-16 - 64GB

Rocky Linux 8.10 - 4.18.0-553.16.1.el8_10.cloud.0.1.x86_64 - GCC 13.3.1 20240611

1 System - 157 Benchmark Results

INTEL XEON GOLD 5512U - Supermicro Super Server 0123456789 - 256GB

FreeBSD - 14.1-RELEASE - Clang 18.1.5

1 System - 2 Benchmark Results

AMD Ryzen 9 7950X3D 16-Core - ASRock B650E Taichi Lite - AMD Raphael

Garuda Soaring - 6.12.4-zen1-1-zen - KDE Plasma 6.2.4

1 System - 5 Benchmark Results

AMD Eng Sample 100-000000560-40_Y - (5.24 BIOS) - AMD 17h-19h PCIe Root Complex

Ubuntu 24.04 - 6.8.0-49-generic - GNOME Shell 46.0

1 System - 143 Benchmark Results

Apple M4 Max - Apple MacBook Pro - 128GB

macOS 15.1 - 24.1.0 - GCC 16.0.0 + Clang 16.0.0

2 Systems - 52 Benchmark Results

Intel Xeon Silver 4410Y - Supermicro Super Server 0123456789 - 128GB

FreeBSD - 14.1-RELEASE - Clang 18.1.5

1 System - 52 Benchmark Results

Intel Xeon Silver 4410Y - Supermicro Super Server 0123456789 - 128GB

FreeBSD - 14.1-RELEASE - Clang 18.1.5

1 System - 4 Benchmark Results

Intel Xeon Silver 4410Y - Supermicro Super Server 0123456789 - 128GB

FreeBSD - 14.1-RELEASE - Clang 18.1.5

1 System - 17 Benchmark Results

AMD Ryzen 9 5900X 12-Core - ASRock X570 Phantom Gaming 4 - AMD Starship

Fedora 41 - 6.11.5-300.fc41.x86_64 - Cinnamon 6.2.9

1 System - 141 Benchmark Results

rv64imafdcvsu - T-HEAD Light Lichee Pi 4A configuration for 16GB DDR board - 16GB

Debian - 5.10.113-lpi4a - X Server 1.21.1.8

1 System - 52 Benchmark Results

Intel Xeon E5-2630 v3 - Supermicro X10DRi 123456789 - 64GB

FreeBSD - 13.4-RELEASE - Clang 18.1.6

1 System - 294 Benchmark Results

Intel Xeon Gold 5412U - ASRockRack SPC741D8UD-2T/X550/H - Intel Device 1bce

Clear Linux OS 42410 - 6.10.9-1462.native - X Server

1 System - 286 Benchmark Results

1 System - 280 Benchmark Results

Intel Xeon Gold 5412U - ASRockRack SPC741D8UD-2T/X550/H - Intel Device 1bce

Clear Linux OS 42410 - 6.10.9-1462.native - X Server

Most Popular Test Results

OpenBenchmarking.org Results Compare

2 Systems - 52 Benchmark Results

Intel Xeon Silver 4410Y - Supermicro Super Server 0123456789 - 128GB

FreeBSD - 14.1-RELEASE - Clang 18.1.5

1 System - 363 Benchmark Results

2 x Intel Xeon Gold 5118 - Cisco UCSB-B200-M5 - Intel Sky Lake-E DMI3 Registers

OracleServer 8.10 - 5.15.0-208.159.3.2.el8uek.x86_64 - GCC 10.3.1 20210422

1 System - 294 Benchmark Results

Intel Xeon Gold 5412U - ASRockRack SPC741D8UD-2T/X550/H - Intel Device 1bce

Clear Linux OS 42410 - 6.10.9-1462.native - X Server

1 System - 280 Benchmark Results

Intel Xeon Gold 5412U - ASRockRack SPC741D8UD-2T/X550/H - Intel Device 1bce

Ubuntu 22.04 - 5.15.0-119-generic - 1.3.255

1 System - 461 Benchmark Results

AMD Ryzen 7 5800X 8-Core - GIGABYTE MC12-LE0-00 v01000100 - AMD Starship

Ubuntu 24.04 - 6.11.0-061100-generic - GNOME Shell 46.0

1 System - 286 Benchmark Results

1 System - 280 Benchmark Results

Intel Xeon Gold 5412U - ASRockRack SPC741D8UD-2T/X550/H - Intel Device 1bce

Clear Linux OS 42410 - 6.10.9-1462.native - X Server

1 System - 294 Benchmark Results

Intel Xeon Gold 5412U - ASRockRack SPC741D8UD-2T/X550/H - Intel Device 1bce

Ubuntu 22.04 - 5.15.0-119-generic - 1.3.255

1 System - 286 Benchmark Results

Intel Xeon Gold 5412U - ASRockRack SPC741D8UD-2T/X550/H - Intel Device 1bce

Ubuntu 22.04 - 5.15.0-119-generic - 1.3.255

1 System - 347 Benchmark Results

4 x Intel Xeon Gold 5118 - Intel 440BX - Intel 440BX

OracleServer 8.10 - 4.18.0-553.22.1.el8_10.x86_64 - GCC 10.3.1 20210422

1 System - 347 Benchmark Results

1 System - 352 Benchmark Results

8 x Intel Xeon Gold 5118 - Intel 440BX - Intel 440BX

Oracle Linux Server 9.4 - 5.14.0-427.37.1.el9_4.x86_64 - GCC 11.4.1 20231218

1 System - 141 Benchmark Results

rv64imafdcvsu - T-HEAD Light Lichee Pi 4A configuration for 16GB DDR board - 16GB

Debian - 5.10.113-lpi4a - X Server 1.21.1.8

1 System - 352 Benchmark Results

1 System - 52 Benchmark Results

Intel Xeon E5-2630 v3 - Supermicro X10DRi 123456789 - 64GB

FreeBSD - 13.4-RELEASE - Clang 18.1.6

Find More Test Results