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

11 January 2022

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.082021.122022.042022.0880K160K240K320K400K
* 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 13 August 2022.
10045.0%100019.2%135.8%Scaling Factor Option PopularityOpenBenchmarking.org
50019.7%25020.7%117.7%10021.1%5020.7%Clients Option PopularityOpenBenchmarking.org
Read Only51.2%Read Write48.8%Mode Option PopularityOpenBenchmarking.org

Revision History

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

C/C++ Compiler Tests

Database Test Suite

Server

Multi-Core

Common Kernel Benchmarks

CPU Massive


Performance Metrics

Analyze Test Configuration:

PostgreSQL pgbench 14.0

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

OpenBenchmarking.org metrics for this test profile configuration based on 257 public results since 30 September 2021 with the latest data as of 10 August 2022.

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)
100th
3
8876 +/- 40
99th
4
3901 +/- 22
96th
6
3508 +/- 20
93rd
3
3227 +/- 60
85th
9
2410 +/- 12
78th
7
2120 +/- 12
Mid-Tier
75th
< 2082
66th
6
1283 +/- 89
53rd
3
1022 +/- 76
Median
50th
1001
30th
3
612 +/- 18
30th
3
605 +/- 13
27th
3
567 +/- 3
Low-Tier
25th
< 515
21st
4
434 +/- 10
20th
3
429 +/- 24
17th
3
374 +/- 1
16th
3
372 +/- 1
10th
3
284 +/- 18
OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 1 - Clients: 1 - Mode: Read Write257 Results Range From 57 To 8921 TPS57235413591769947112513031481165918372015219323712549272729053083326134393617379539734151432945074685486350415219539755755753593161096287646566436821699971777355753377117889806782458423860187798957816243240

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

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

OpenBenchmarking.orgPercent, Fewer Is BetterAverage Deviation Between RunsScaling Factor: 1 - Clients: 1 - Mode: Read WriteDeviation48121620Min: 0 / Avg: 1.05 / Max: 17

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: 18 January 2022

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)
Intel / AMD x86 32-bit
i686
(Many Processors)
ARMv7 32-bit
armv7l
ARMv7 Cortex-A72 4-Core
ARMv8 64-bit
aarch64
ARMv8 Neoverse-N1, ARMv8 Neoverse-N1 4-Core, ARMv8 Neoverse-V1 4-Core, Apple M2, Phytium D2000

Recent Test Results

OpenBenchmarking.org Results Compare

3 Systems - 195 Benchmark Results

Apple M2 - Apple MacBook Air - 8GB

Arch rolling - 5.19.0-rc7-asahi-2-1-ARCH - KDE Plasma 5.25.4

1 System - 108 Benchmark Results

AMD Ryzen 3 PRO 5450U - LENOVO 20X8S02500 - AMD Renoir

Ubuntu 22.04 - 5.15.0-43-generic - GNOME Shell 42.2

1 System - 108 Benchmark Results

AMD Ryzen 3 PRO 5450U - LENOVO 20X8S02500 - AMD Renoir

Ubuntu 22.04 - 5.15.0-43-generic - GNOME Shell 42.2

1 System - 275 Benchmark Results

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

CentOS 7.9.2009 - 3.10.0-1160.71.1.el7.x86_64 - X Server

1 System - 224 Benchmark Results

Common KVM - QEMU Standard PC - Intel 440FX 82441FX PMC

Ubuntu 20.04 - 5.4.0-122-generic - GCC 9.4.0

1 System - 275 Benchmark Results

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

CentOS 7.9.2009 - 3.10.0-1160.62.1.el7.x86_64 - X Server

3 Systems - 21 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

4 Systems - 19 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

3 Systems - 19 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

1 System - 12 Benchmark Results

2 x Intel Xeon E5-2640 0 - IBM 00Y4918 - 16 x 4096 MB Hynix HMT351V7EFR8A-H9

Microsoft Windows Server 2012 R2 Datacenter Build 9600 - 6.3.9600 - 6.3.9600.16384

2 Systems - 18 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

1 System - 18 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

1 System - 17 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

1 System - 16 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

1 System - 15 Benchmark Results

Intel Core i7-8700T - HP 83E2 - Intel Cannon Lake PCH

Ubuntu 20.04 - 5.11.0-37-generic - GNOME Shell 3.36.9

Most Popular Test Results

OpenBenchmarking.org Results Compare

8 Systems - 364 Benchmark Results

AMD EPYC 7742 64-Core - Supermicro H11DSi-NT v2.00 - AMD Starship

Ubuntu 21.10 - 5.13.0-19-generic - GNOME Shell 40.5

4 Systems - 54 Benchmark Results

AMD Ryzen 7 5700G - ASUS TUF GAMING B550M-PLUS - AMD Renoir Root Complex

Ubuntu 21.10 - 5.14.0-rc7-amd-pstate-phx - GNOME Shell 40.2

4 Systems - 71 Benchmark Results

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

Ubuntu 21.10 - 5.15.0-rc2-3reverts - GNOME Shell 40.2

3 Systems - 326 Benchmark Results

AMD EPYC 7742 64-Core - Supermicro H11DSi-NT v2.00 - AMD Starship

Ubuntu 21.10 - 5.13.0-19-generic - GNOME Shell 40.5

4 Systems - 318 Benchmark Results

AMD EPYC 7F52 16-Core - Supermicro H11DSi-NT v2.00 - AMD Starship

Ubuntu 21.10 - 5.13.0-19-generic - GNOME Shell 40.5

3 Systems - 127 Benchmark Results

Intel Xeon E3-1280 v5 - MSI Z170A SLI PLUS - Intel Xeon E3-1200 v5

Ubuntu 20.04 - 5.13.0-051300-generic - GNOME Shell 3.36.9

5 Systems - 200 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

2 Systems - 69 Benchmark Results

AMD Ryzen 7 5700U - LENOVO LNVNB161216 - AMD Renoir Root Complex

Ubuntu 20.04 - 5.11.0-40-generic - GNOME Shell 3.36.9

3 Systems - 71 Benchmark Results

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

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

3 Systems - 24 Benchmark Results

Intel Xeon W-2123 - HP 81C5 - 2 x 8192 MB 2666MHz Samsung M393A1K43BB1-CTD

Microsoft Windows 10 Enterprise Build 19042 - 10.0 - 391.33

3 Systems - 24 Benchmark Results

Intel Core i7-9850H - Dell 0WWHJ2 - 1 x 16384 MB 2667MHz HMA82GS6JJR8N-VK

Microsoft Windows 10 Enterprise Build 19042 - 10.0 - 462.31

3 Systems - 60 Benchmark Results

2 x AMD EPYC 7742 64-Core - Supermicro H11DSi-NT v2.00 - AMD Starship

Ubuntu 21.10 - 5.15.0-rc4-cluster-sched - GNOME Shell 40.5

4 Systems - 113 Benchmark Results

Intel Xeon Gold 6226R - Supermicro X11SPL-F v1.02 - Intel Sky Lake-E DMI3 Registers

Ubuntu 20.10 - 5.11.0-rc4-max-boost-inv-patch - GNOME Shell 3.38.1

Find More Test Results