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

24 September 2020

Test Maintainer

Michael Larabel 

Test Type

System

Average Install Time

1 Minute, 22 Seconds

Average Run Time

5 Minutes, 37 Seconds

Test Dependencies

C/C++ Compiler Toolchain + BC

Accolades

250k+ Downloads + 10k+ Public Benchmark Results

Supported Platforms


Public Result UploadsTest Completions*Reported Installs*OpenBenchmarking.orgEventsPostgreSQL pgbench Popularity Statisticspts/pgbench2011.042011.082011.122012.042012.082012.122013.042013.082013.122014.042014.082014.122015.042015.082015.122016.042016.082016.122017.042017.082017.122018.042018.082018.122019.042019.082019.122020.042020.082020.122021.0440K80K120K160K200K
* 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.
Data current as of Sat, 10 Apr 2021 15:53:38 GMT.
10007.5%10078.9%113.7%Scaling Factor Option PopularityOpenBenchmarking.org
19.0%2506.9%1007.8%5076.4%Clients Option PopularityOpenBenchmarking.org
Read Write83.7%Read Only16.3%Mode Option PopularityOpenBenchmarking.org

Revision History

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

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: 100 - Clients: 50 - Mode: Read Write

OpenBenchmarking.org metrics for this test profile configuration based on 19,233 public results since 24 September 2020 with the latest data as of 10 April 2021.

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.

Component
Percentile Rank
# Matching Public Results
TPS (Average)
100th
4
48574 +/- 532
100th
7
39382 +/- 4666
100th
78
28722 +/- 34
100th
5
24230 +/- 3181
100th
12
24038 +/- 1673
100th
3
19892 +/- 556
100th
9
18827 +/- 504
100th
3
16698 +/- 2248
100th
3
13434 +/- 670
100th
3
13196 +/- 51
100th
12
11460 +/- 41
100th
5
8861 +/- 327
100th
7
8784 +/- 321
100th
3
7721 +/- 680
100th
3
6291 +/- 347
100th
3
4088 +/- 67
99th
4
3524 +/- 190
99th
4
3502 +/- 148
99th
3
3487 +/- 138
94th
3
1552 +/- 25
OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 100 - Clients: 50 - Mode: Read Write18771 Results Range From 44 To 49603 TPS441036202830204012500459966988798089729964109561194812940139321492415916169081790018892198842087621868228602385224844258362682827820288122980430796317883278033772347643575636748377403873239724407164170842700436924468445676466684766048652496444K8K12K16K20K

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

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

OpenBenchmarking.orgPercent, Fewer Is BetterAverage Deviation Between RunsScaling Factor: 100 - Clients: 50 - Mode: Read WriteDeviation918273645Min: 0 / Avg: 10.74 / Max: 43

Does It Scale Well With Increasing Cores?

Yes, based on the automated analysis of the collected public benchmark data, this test / test settings does generally scale well with increasing CPU core counts. Data based on publicly available results for this test / test settings, separated by vendor, result divided by the reference CPU clock speed, grouped by matching physical CPU core count, and normalized against the smallest core count tested from each vendor for each CPU having a sufficient number of test samples and statistically significant data.

IntelAMDOpenBenchmarking.orgRelative Core Scaling To BasePostgreSQL pgbench CPU Core ScalingScaling Factor: 100 - Clients: 50 - Mode: Read Write48162432481.38752.7754.16255.556.9375

Recent Test Results

OpenBenchmarking.org Results Compare

1 System - 13 Benchmark Results

Intel Xeon E5-2680 v2 - Red Hat KVM - Intel 440FX 82441FX PMC

Ubuntu 18.04 - 4.15.0-136-generic - GCC 7.5.0

1 System - 14 Benchmark Results

Intel Xeon Silver 4214 - 1024MB - 20GB

Ubuntu 20.04 - 5.4.0 - GCC 9.3.0

1 System - 14 Benchmark Results

AMD EPYC 7702P 64-Core - netcup KVM Server - Intel 440FX 82441FX PMC

Debian 10 - 4.19.0-14-amd64 - GCC 8.3.0

1 System - 206 Benchmark Results

2 x Intel $0000% - Supermicro X12DPi-N6 v1.00 - Intel Device 0998

CentOS Linux 8 - 4.18.0-80.el8.x86_64 - GCC 8.3.1 20191121

1 System - 13 Benchmark Results

Intel Xeon E5-2680 v2 - Red Hat KVM - Intel 440FX 82441FX PMC

Ubuntu 18.04 - 4.15.0-136-generic - GCC 7.5.0

1 System - 14 Benchmark Results

Intel Xeon Silver 4214 - 1024MB - 20GB

Ubuntu 20.04 - 5.4.0 - GCC 9.3.0

1 System - 14 Benchmark Results

AMD EPYC 7702P 64-Core - netcup KVM Server - Intel 440FX 82441FX PMC

Debian 10 - 4.19.0-14-amd64 - GCC 8.3.0

1 System - 14 Benchmark Results

Intel Xeon Silver 4214 - 1024MB - 20GB

Ubuntu 20.04 - 5.4.0 - GCC 9.3.0

1 System - 13 Benchmark Results

Intel Xeon E5-2680 v2 - Red Hat KVM - Intel 440FX 82441FX PMC

Ubuntu 18.04 - 4.15.0-136-generic - GCC 7.5.0

1 System - 14 Benchmark Results

AMD EPYC 7702P 64-Core - netcup KVM Server - Intel 440FX 82441FX PMC

Debian 10 - 4.19.0-14-amd64 - GCC 8.3.0

1 System - 14 Benchmark Results

Intel Xeon Silver 4214 - 1024MB - 20GB

Ubuntu 20.04 - 5.4.0 - GCC 9.3.0

1 System - 13 Benchmark Results

Intel Xeon E5-2680 v2 - Red Hat KVM - Intel 440FX 82441FX PMC

Ubuntu 18.04 - 4.15.0-136-generic - GCC 7.5.0

Most Popular Test Results

OpenBenchmarking.org Results Compare

3 Systems - 4 Benchmark Results

ARMv8 Cortex-A72 - BCM2835 Raspberry Pi 4 Model B Rev 1.4 - 8GB

Ubuntu 20.10 - 5.8.0-1015-raspi - GCC 10.2.0

3 Systems - 131 Benchmark Results

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

Ubuntu 20.04 - 5.4.0-45-generic - GNOME Shell 3.36.4

3 Systems - 34 Benchmark Results

AMD Ryzen 9 5950X 16-Core - ASUS ROG CROSSHAIR VIII HERO - AMD Starship

Ubuntu 20.10 - 5.8.0-44-generic - GNOME Shell 3.38.2

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

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

Find More Test Results