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

5 January 2023

Test Maintainer

Michael Larabel 

Test Type

System

Average Install Time

1 Minute, 28 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.082022.1280K160K240K320K400K
* 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 6 February 2023.
140.4%10040.2%100019.4%Scaling Factor Option PopularityOpenBenchmarking.org
113.9%100012.3%50016.0%10016.4%5014.0%80012.3%25015.1%Clients Option PopularityOpenBenchmarking.org
Read Only50.6%Read Write49.4%Mode Option PopularityOpenBenchmarking.org

Revision History

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

C/C++ Compiler Tests

Database Test Suite

Server

Multi-Core

Common Kernel Benchmarks

CPU Massive


Performance Metrics

Analyze Test Configuration:

PostgreSQL 15

Scaling Factor: 1 - Clients: 100 - Mode: Read Write - Average Latency

OpenBenchmarking.org metrics for this test profile configuration based on 67 public results since 5 January 2023 with the latest data as of 6 February 2023.

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
ms (Average)
Mid-Tier
75th
> 32
Median
50th
81
Low-Tier
25th
> 186
24th
4
187 +/- 2
20th
3
211 +/- 28
11th
3
295 +/- 7
6th
3
360 +/- 7
OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 1 - Clients: 100 - Mode: Read Write - Average Latency67 Results Range From 15 To 575 ms15396387111135159183207231255279303327351375399423447471495519543567591612182430

Based on OpenBenchmarking.org data, the selected test / test configuration (PostgreSQL 15 - Scaling Factor: 1 - Clients: 100 - Mode: Read Write - Average Latency) has an average run-time of 11 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: 100 - Mode: Read Write - Average LatencyRun-Time612182430Min: 7 / Avg: 10.56 / Max: 26

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

OpenBenchmarking.orgPercent, Fewer Is BetterAverage Deviation Between RunsScaling Factor: 1 - Clients: 100 - Mode: Read Write - Average LatencyDeviation510152025Min: 0 / Avg: 0.34 / Max: 19

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: 6 January 2023

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 - 179 Benchmark Results

AMD Ryzen 7 4700U - LENOVO LNVNB161216 - AMD Renoir

Ubuntu 22.04 - 5.18.8-051808-generic - GNOME Shell 42.2

1 System - 365 Benchmark Results

2 x Intel Xeon Gold 6226 - Cisco UCSC-C220-M5SX - Intel Sky Lake-E DMI3 Registers

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

3 Systems - 195 Benchmark Results

AMD Ryzen 9 7900 12-Core - Gigabyte B650M DS3H - AMD Device 14d8

Ubuntu 22.10 - 6.2.0-060200rc5daily20230129-generic - GNOME Shell 43.0

1 System - 257 Benchmark Results

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

OracleServer 7.9 - 4.14.35-2047.521.4.el7uek.x86_64 - GCC 9.3.1 20200408

1 System - 325 Benchmark Results

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

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

1 System - 325 Benchmark Results

4 Systems - 297 Benchmark Results

2 x Intel Xeon Platinum 8490H - Quanta Cloud S6Q-MB-MPS - Intel Device 1bce

Clear Linux OS 38100 - 6.1.7-1247.native - X Server 1.21.1.6

3 Systems - 318 Benchmark Results

2 x Intel Xeon Platinum 8490H - Quanta Cloud S6Q-MB-MPS - Intel Device 1bce

Clear Linux OS 38100 - 6.1.7-1247.native - X Server 1.21.1.6

1 System - 341 Benchmark Results

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

OracleServer 7.9 - 4.14.35-2047.511.5.8.el7uek.x86_64 - GCC 9.3.1 20200408

1 System - 361 Benchmark Results

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

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

1 System - 361 Benchmark Results

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

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

2 Systems - 285 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

1 System - 2 Benchmark Results

AMD Ryzen 9 7950X 16-Core - ASRock X670E Pro RS - AMD Device 14d8

Ubuntu 22.04 - 5.15.0-58-generic - GNOME Shell 42.5

1 System - 2 Benchmark Results

AMD Ryzen 9 7950X 16-Core - ASRock X670E Pro RS - AMD Device 14d8

Ubuntu 22.04 - 5.15.0-58-generic - GNOME Shell 42.5

1 System - 4 Benchmark Results

Intel Xeon E3-1505M v6 - Dell 06X96V - Intel Xeon E3-1200 v6

Ubuntu 22.04 - 5.15.0-58-generic - GNOME Shell 42.5

Most Popular Test Results

OpenBenchmarking.org Results Compare

3 Systems - 60 Benchmark Results

AMD Ryzen 7 PRO 5850U - HP 8A78 - AMD Renoir

Pop 22.04 - 5.19.0-76051900-generic - GNOME Shell 42.3.1

3 Systems - 48 Benchmark Results

AMD Ryzen Threadripper 2950X 16-Core - ASRock X399M Taichi - AMD 17h

Ubuntu 18.04 - 4.15.0-201-lowlatency - GNOME Shell 3.28.4

3 Systems - 60 Benchmark Results

AMD Ryzen 9 5900HX - ASUS G513QY v1.0 - AMD Renoir

Ubuntu 22.10 - 5.19.0-26-generic - GNOME Shell 43.0

4 Systems - 68 Benchmark Results

Intel Core i9-13900K - ASUS PRIME Z790-P WIFI - Intel Device 7a27

Ubuntu 22.10 - 6.2.0-rc2-phx - GNOME Shell 43.1

3 Systems - 84 Benchmark Results

AMD Ryzen Threadripper 3990X 64-Core - Gigabyte TRX40 AORUS PRO WIFI - AMD Starship

Ubuntu 22.10 - 6.1.0-rc8-phx-mglru - GNOME Shell 43.0

2 Systems - 131 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-49-generic - GNOME Shell 3.38.4

3 Systems - 84 Benchmark Results

2 x AMD EPYC 9654 96-Core - AMD Titanite_4G - AMD Device 14a4

Ubuntu 23.04 - 5.19.0-21-generic - GNOME Shell 43.1

2 Systems - 69 Benchmark Results

Intel Core i9-10980XE - ASRock X299 Steel Legend - Intel Sky Lake-E DMI3 Registers

Ubuntu 22.04 - 5.19.0-051900rc7-generic - GNOME Shell 42.2

3 Systems - 105 Benchmark Results

AMD Ryzen Threadripper 3970X 32-Core - ASUS ROG ZENITH II EXTREME - AMD Starship

Ubuntu 22.04 - 5.19.0-051900rc7-generic - GNOME Shell 42.2

2 Systems - 48 Benchmark Results

AMD Ryzen Threadripper 2950X 16-Core - ASRock X399M Taichi - AMD 17h

Ubuntu 18.04 - 4.15.0-201-lowlatency - GNOME Shell 3.28.4

3 Systems - 84 Benchmark Results

2 x AMD EPYC 9654 96-Core - AMD Titanite_4G - AMD Device 14a4

Ubuntu 23.04 - 5.19.0-21-generic - GNOME Shell 43.1

2 Systems - 69 Benchmark Results

Intel Core i9-10980XE - ASRock X299 Steel Legend - Intel Sky Lake-E DMI3 Registers

Ubuntu 22.04 - 5.19.0-051900rc7-generic - GNOME Shell 42.2

3 Systems - 61 Benchmark Results

AMD Ryzen 9 7950X 16-Core - ASUS ROG CROSSHAIR X670E HERO - AMD Device 14d8

Ubuntu 22.10 - 6.2.0-rc1-phx - GNOME Shell 43.1

3 Systems - 195 Benchmark Results

AMD Ryzen 9 7900 12-Core - Gigabyte B650M DS3H - AMD Device 14d8

Ubuntu 22.10 - 6.2.0-060200rc5daily20230129-generic - GNOME Shell 43.0

1 System - 361 Benchmark Results

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

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

Find More Test Results