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 July 2021

Test Maintainer

Michael Larabel 

Test Type

System

Average Install Time

1 Minute, 29 Seconds

Average Run Time

5 Minutes, 37 Seconds

Test Dependencies

C/C++ Compiler Toolchain + BC

Accolades

300k+ 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.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.042021.0870K140K210K280K350K
* 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 current as of 20 September 2021.
10092.8%17.2%Scaling Factor Option PopularityOpenBenchmarking.org
Read Write90.7%Read Only9.3%Mode Option PopularityOpenBenchmarking.org

Revision History

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

C/C++ Compiler Tests

Database Test Suite

Multi-Core

Server

Common Kernel Benchmarks

CPU Massive


Performance Metrics

Analyze Test Configuration:

PostgreSQL pgbench 13.0

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

OpenBenchmarking.org metrics for this test profile configuration based on 804 public results since 24 September 2020 with the latest data as of 15 September 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
# Compatible Public Results
TPS (Average)
91st
87
4867 +/- 56
88th
6
3696 +/- 114
88th
9
3687 +/- 147
88th
4
3687 +/- 34
88th
9
3655 +/- 131
77th
7
3279 +/- 171
Mid-Tier
75th
< 3073
61st
3
2012 +/- 19
60th
3
1933 +/- 90
58th
9
1602 +/- 216
Median
50th
1027
36th
6
897 +/- 101
36th
6
875 +/- 73
35th
3
825 +/- 44
33rd
7
777 +/- 70
29th
3
704 +/- 17
26th
3
564 +/- 5
Low-Tier
25th
< 541
25th
3
509 +/- 11
24th
8
489 +/- 26
22nd
6
442 +/- 19
18th
3
370 +/- 12
17th
3
333 +/- 1
16th
3
302 +/- 2
6th
5
175 +/- 4
5th
10
162 +/- 20
4th
6
109 +/- 1
OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 1 - Clients: 1 - Mode: Read Write804 Results Range From 31 To 5165 TPS311342373404435466497528559581061116412671370147315761679178218851988209121942297240025032606270928122915301831213224332734303533363637393842394540484151425443574460456346664769487249755078518120406080100

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

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

OpenBenchmarking.orgPercent, Fewer Is BetterAverage Deviation Between RunsScaling Factor: 1 - Clients: 1 - Mode: Read WriteDeviation510152025Min: 0 / Avg: 1.57 / Max: 20

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: 1 - Clients: 1 - Mode: Read Write48162432480.80421.60842.41263.21684.021

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
SSE2 (SSE2)
Used by default on supported hardware.
 
COMISD DIVSD MULSD CVTTSD2SI CVTSI2SD ADDSD SUBSD UCOMISD MOVAPD SQRTSD ANDPD ANDNPD ORPD MOVDQU XORPD MAXSD MINSD MOVDQA
Requires passing a supported compiler/build flag (verified with targets: sandybridge, skylake, znver2, znver3).
Found on Intel processors since Sandy Bridge (2011).
Found on AMD processors since Bulldozer (2011).

 
VZEROUPPER VINSERTF128 VEXTRACTF128 VBROADCASTSS
Requires passing a supported compiler/build flag (verified with targets: skylake, znver2, znver3).
Found on Intel processors since Haswell (2013).
Found on AMD processors since Excavator (2016).

 
VPBROADCASTQ VEXTRACTI128 VINSERTI128 VPBROADCASTD
FMA (FMA)
Requires passing a supported compiler/build flag (verified with targets: skylake, znver2, znver3).
Found on Intel processors since Haswell (2013).
Found on AMD processors since Bulldozer (2011).

 
VFNMADD231SD VFMADD213SD VFMSUB132SD VFNMADD213SD VFNMADD132SD VFMADD132SD
The test / benchmark does honor compiler flag changes.
Last automated analysis: 10 May 2021

This test profile binary relies on the shared libraries libpq.so.5, libpthread.so.0, libm.so.6, libc.so.6.

Recent Test Results

OpenBenchmarking.org Results Compare

1 System - 259 Benchmark Results

AMD Ryzen 9 5950X 16-Core - ASUS PRIME B550M-A - AMD Starship

Fedora 34 - 5.14.6-xm1.0.fc34.x86_64 - KDE Plasma 5.22.4

2 Systems - 108 Benchmark Results

ARMv8 rev 0 - e3360_1099 - 32GB

Ubuntu 20.04 - 5.10.41-tegra - X Server

2 Systems - 96 Benchmark Results

ARMv8 rev 0 - e3360_1099 - 32GB

Ubuntu 20.04 - 5.10.41-tegra - X Server

2 Systems - 95 Benchmark Results

ARMv8 rev 0 - e3360_1099 - 32GB

Ubuntu 20.04 - 5.10.41-tegra - X Server

3 Systems - 192 Benchmark Results

2 x Intel Xeon Gold 5220R - TYAN S7106 - Intel Sky Lake-E DMI3 Registers

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

1 System - 13 Benchmark Results

2 x Intel Xeon Gold 6254 - HPE ProLiant DL380 Gen10 - Intel Sky Lake-E DMI3 Registers

Ubuntu 20.04 - 5.4.0-84-generic - 1.0.2

1 System - 13 Benchmark Results

2 x Intel Xeon Platinum 8124M - Amazon EC2 c5n.metal v1.0 - Intel Sky Lake-E DMI3 Registers

Ubuntu 20.04 - 5.4.0-1045-aws - 1.0.2

1 System - 13 Benchmark Results

2 x Intel Xeon - RDO OpenStack Compute - Intel 440FX 82441FX PMC

CentOS Linux 8 - 4.18.0-305.17.1.el8_4.x86_64 - GCC 8.4.1 20200928

5 Systems - 186 Benchmark Results

2 x Intel Xeon Platinum 8280 - GIGABYTE MD61-SC2-00 v01000100 - Intel Sky Lake-E DMI3 Registers

Ubuntu 21.04 - 5.11.0-16-generic - GNOME Shell 3.38.4

1 System - 13 Benchmark Results

2 x Intel Xeon - RDO OpenStack Compute - Intel 440FX 82441FX PMC

CentOS Linux 8 - 4.18.0-305.17.1.el8_4.x86_64 - GCC 8.4.1 20200928

1 System - 13 Benchmark Results

Intel Xeon E5-2680 v2 - Xen HVM domU - Intel 440FX 82441FX PMC

CentOS Linux 8 - 4.18.0-193.6.3.el8_2.x86_64 - GCC 8.4.1 20200928

1 System - 13 Benchmark Results

2 x Intel Xeon Gold 6254 - HPE ProLiant DL380 Gen10 - Intel Sky Lake-E DMI3 Registers

Ubuntu 20.04 - 5.4.0-84-generic - 1.0.2

1 System - 13 Benchmark Results

2 x Intel Xeon - RDO OpenStack Compute - Intel 440FX 82441FX PMC

CentOS Linux 8 - 4.18.0-305.17.1.el8_4.x86_64 - GCC 8.4.1 20200928

1 System - 13 Benchmark Results

2 x Intel Xeon Platinum 8275CL - Amazon EC2 c5d.metal v1.0 - Intel Sky Lake-E DMI3 Registers

CentOS Linux 8 - 4.18.0-193.6.3.el8_2.x86_64 - GCC 8.4.1 20200928

1 System - 13 Benchmark Results

Intel Xeon Platinum 8175M - Amazon EC2 t3.medium - Intel 440FX 82441FX PMC

CentOS Linux 8 - 4.18.0-193.6.3.el8_2.x86_64 - GCC 8.4.1 20200928

Most Popular Test Results

OpenBenchmarking.org Results Compare

6 Systems - 8 Benchmark Results

AMD Ryzen 5 3600XT 6-Core - Gigabyte B550M DS3H - AMD Starship

Linuxmint 20.1 - 5.4.0-65-generic - Xfce

5 Systems - 8 Benchmark Results

AMD Ryzen 5 3600XT 6-Core - Gigabyte B550M DS3H - AMD Starship

Linuxmint 20.1 - 5.4.0-65-generic - Xfce

4 Systems - 8 Benchmark Results

AMD Ryzen 5 3600XT 6-Core - Gigabyte B550M DS3H - AMD Starship

Linuxmint 20.1 - 5.4.0-65-generic - Xfce

2 Systems - 8 Benchmark Results

AMD Ryzen 5 3600XT 6-Core - Gigabyte B550M DS3H - AMD Starship

Linuxmint 20.1 - 5.4.0-65-generic - Xfce

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

4 Systems - 513 Benchmark Results

Intel Xeon E-2278GEL - Logic Supply RXM-181 - Intel Cannon Lake PCH

Ubuntu 20.10 - 5.8.0-26-generic - GNOME Shell 3.38.1

1 System - 12 Benchmark Results

2 x Intel Xeon E5-2609 0 - Cisco UCSC-C220-M3S - Intel Xeon E5

Debian 10 - 4.19.0-13-amd64 - GCC 8.3.0

1 System - 12 Benchmark Results

Intel Atom E3845 - Seco 0A36 - Intel Atom Z36xxx

sky_blue 1.0.0 - 5.4.69-yocto-standard - GCC 9.3.0

1 System - 14 Benchmark Results

2 x Intel Xeon E5-2609 0 - Cisco UCSC-C220-M3S - Intel Xeon E5

Debian 10 - 4.19.0-13-amd64 - GCC 8.3.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