PostgreSQL pgbench

This is a simple TPC-B like benchmark of PostgreSQL.

Learn more about this test at the upstream project site: http://www.postgresql.org/.

This benchmark test profile is maintained by Michael Larabel. This OpenBenchmarking.org test profile was created on 6 December 2010 and last updated on 24 September 2020. To run this test with the Phoronix Test Suite, the basic command is: phoronix-test-suite benchmark pgbench.

This test has an average install time of 46 seconds and an average run-time of 5 minutes, 58 seconds.

250k+ Downloads + 5k+ Public Benchmark Results

Installation StatsTest Completion StatsOpenBenchmarking.orgEventsPostgreSQL pgbench Popularitypts/pgbench2015.102015.122016.022016.042016.062016.082016.102016.122017.022017.042017.062017.082017.102017.122018.022018.042018.062018.082018.102018.122019.022019.042019.062019.082019.102019.122020.022020.042020.062020.0831313612409345745055553

* Data based on those opting to upload their test results to OpenBenchmarking.org and users enabling the opt-in anonymous statistics reporting.

100014.5%10040.6%144.9%Scaling Factor Option PopularityOpenBenchmarking.org
122.2%25021.0%10026.9%5029.9%Clients Option PopularityOpenBenchmarking.org
Read Write51.6%Read Only48.4%Mode Option PopularityOpenBenchmarking.org

Revision History

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

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

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

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

pts/pgbench-1.8.7   [View Source]   29 Mar 2019 03:20 EDT
Update download URLs.

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

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

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

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

pts/pgbench-1.8.2   [View Source]   22 Mar 2018 18:06 EDT
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]   01 Mar 2018 11:46 EST
Tidy up the Windows support, appears to be good to go.

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

pts/pgbench-1.7.0   [View Source]   14 Oct 2017 15:23 EDT
Updating against postgresql 10.0

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

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

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

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

pts/pgbench-1.4.0   [View Source]   11 Apr 2012 10:15 EDT
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]   27 Aug 2011 16:23 EDT
Update PostgreSQL to version 9.0.4.

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

Suites Using This Test

C/C++ Compiler Tests

Database Test Suite

Multi-Core

Common Kernel Benchmarks

Server

CPU Massive

Performance Metrics

Analyze Test Configuration:

PostgreSQL pgbench 13.0

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

OpenBenchmarking.org metrics for this test profile configuration based on 80 public samples since 24 September 2020 with the latest data as of 18 October 2020.

Below is an overview of the generalized performance for components where there is sufficient statistically significant data based upon user-uploaded results. It is important to keep in mind particularly in the Linux/open-source space there can be vastly different OS configurations, with this overview intended to offer just general guidance as to the performance expectations.

OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 1 - Clients: 50 - Mode: Read Write80 Results Range From 86 To 5880 TPS862023184345506667828981014113012461362147815941710182619422058217422902406252226382754287029863102321833343450356636823798391440304146426243784494461047264842495850745190530654225538565457705886510152025

Based on OpenBenchmarking.org data, the selected test / test configuration (PostgreSQL pgbench 13.0 - Scaling Factor: 1 - Clients: 50 - Mode: Read Write) has an average run-time of 2 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: 50 - Mode: Read WriteRun-Time246810Min: 1 / Avg: 1.12 / Max: 3

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: 50 - Mode: Read WriteDeviation3691215Min: 0 / Avg: 0.61 / Max: 7

Recent Test Results

Compare

1 System - 43 Benchmark Results

Intel Xeon E-2288G - Compulab SBC-ATCFL v1.2 - Intel Cannon Lake PCH

Ubuntu 19.10 - 5.3.0-64-generic - GNOME Shell 3.34.1

1 System - 44 Benchmark Results

Intel Xeon E-2288G - Compulab SBC-ATCFL v1.2 - Intel Cannon Lake PCH

Ubuntu 19.10 - 5.3.0-64-generic - GNOME Shell 3.34.1

1 System - 2 Benchmark Results

Intel Core i5-8400H - Dell 0YRWN0 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.8.12-VLC - GNOME Shell 3.36.4

1 System - 198 Benchmark Results

Intel Core i7-7700 - Dell 0MWYPT - Intel Xeon E3-1200 v6

MarIuX64 2.0 GNU - 5.9.0.mx64.348 - Xfce 4.14

10 Systems - 119 Benchmark Results

2 x Intel Xeon Platinum 8259L - ASRockRack EP2C621D16-4LP - Intel Sky Lake-E DMI3 Registers

Ubuntu 19.10 - 5.3.0-64-generic - GNOME Shell 3.34.1

1 System - 44 Benchmark Results

Intel Xeon E-2288G - Compulab SBC-ATCFL v1.2 - Intel Cannon Lake PCH

Ubuntu 19.10 - 5.3.0-64-generic - GNOME Shell 3.34.1

1 System - 2 Benchmark Results

Intel Core i5-8400H - Dell 0YRWN0 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.8.12-VLC - GNOME Shell 3.36.4

1 System - 4 Benchmark Results

8 x Intel Xeon E5-2690 v4 - Xen HVM domU v4.13 - Intel 440FX 82441FX PMC

CentOS Linux 7 - 3.10.0-1127.el7.x86_64 - GCC 4.8.5 20150623

1 System - 43 Benchmark Results

Intel Xeon E-2288G - Compulab SBC-ATCFL v1.2 - Intel Cannon Lake PCH

Ubuntu 19.10 - 5.3.0-64-generic - GNOME Shell 3.34.1

1 System - 44 Benchmark Results

Intel Xeon E-2288G - Compulab SBC-ATCFL v1.2 - Intel Cannon Lake PCH

Ubuntu 19.10 - 5.3.0-64-generic - GNOME Shell 3.34.1

17 Systems - 43 Benchmark Results

ARMv7 Cortex-A72 - BCM2711 Raspberry Pi 4 Model B Rev 1.1 - 4096MB

Raspbian 10 - 5.4.65-v7l+ - LXDE 0.10.0

Most Popular Test Results

Compare

3 Systems - 131 Benchmark Results

Intel Core i5-10600K - ASUS PRIME Z490M-PLUS - Intel Comet Lake PCH

Ubuntu 20.04 - 5.8.14-050814-generic - GNOME Shell 3.36.4

3 Systems - 41 Benchmark Results

Intel Xeon E3-1231 v3 - Gigabyte H81M-S1 - Intel Xeon E3-1200 v3 DRAM

Debian 10 - 4.19.0-11-amd64 - X Server 1.20.4

3 Systems - 119 Benchmark Results

Intel Core i9-7980XE - ASUS PRIME X299-A - Intel Sky Lake-E DMI3 Registers

Ubuntu 20.04 - 5.8.14-050814-generic - GNOME Shell 3.36.4

3 Systems - 147 Benchmark Results

AMD Ryzen 7 3800XT 8-Core - ASRock X570 Pro4 - AMD Starship

Ubuntu 20.04 - 5.9.0-050900rc7daily20201003-generic - GNOME Shell 3.36.4

3 Systems - 114 Benchmark Results

AMD Ryzen 7 1800X Eight-Core - MSI X370 XPOWER GAMING TITANIUM - AMD 17h

Ubuntu 20.10 - 5.8.0-21-generic - GNOME Shell 3.38.0

3 Systems - 208 Benchmark Results

Intel Xeon E3-1260L v5 - ASRock E3V5 WS - Intel Xeon E3-1200 v5

Ubuntu 20.10 - 5.8.0-20-generic - GNOME Shell 3.38.0

Find More Test Results


User Comments

Centos 5.6 notes, workarounds

Do not install this benchmark when running as root. The automated postgres database setup will silently error out, as it insists on being a non-root user. You can install Phoronix as root, but switch to another user to run the "/usr/bin/phoronix-test-suite install pts/pgbench" command. You can't use the benchmark after it's "installed" as root, because the "installation" is local to the user, in ~/.phoronix-test-suite/ directory, and setup will have failed if you do it as root.

Secondly, the benchmark will fail unless you create the following file:

/etc/ld.so.conf.d/postgresql.conf

..and put in it the following line(s) (where /home/YOURUSER is the home directory of the user that you are about to run the install as:

/home/YOURUSER/.phoronix-test-suite/installed-tests/pts/pgbench-1.3.0/pg_/lib/
/home/YOURUSER/.phoronix-test-suite/installed-tests/pts/pgbench-1.3.0/pg_/lib/postgresql/

Cheers,

-Craig @ Halcyon Canada

Post by craighalcyon on 02 December 2011, 11.35.

Quick test for different filesystems.

If you'd like to isolate your I/O devices for this test, a quick way to do so is to create a new user with home directory on the FS you'd like to bench. Then su to that user and install/run the test. Postgres will be installed in ~/.phoronix-test-suite. You may even `usermod -d /tmp test` if you want to run from tmpfs and skip disk I/O altogether. Just beware that if your /tmp is tmpfs (RAM) you will lose all contents after a reboot.

This is a great test. Thanks to the developers. I use it often.

Post by boeroboy on 21 January 2014, 14.26.

Setup on Ubuntu 14

Ubuntu 14.04 comes with GCC 4.8 and the installation of this bench will silently fail. You'll get an error message that the benchmark could not be completed.
Install GCC 4.6 (sudo apt-get install gcc-4.6 g++-4.6) and set it as active (sudo update-alternatives --config gcc). After that, re-install pts/pgbench and you're good to go.

Post by ervin on 17 October 2014, 05.36.

Post A Comment