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

13 October 2022

Test Maintainer

Michael Larabel 

Test Type

System

Average Install Time

1 Minute, 31 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 27 November 2022.
136.4%100019.8%10043.8%Scaling Factor Option PopularityOpenBenchmarking.org
5017.4%10021.5%50020.9%118.4%25021.8%Clients Option PopularityOpenBenchmarking.org
Read Write41.0%Read Only59.0%Mode Option PopularityOpenBenchmarking.org

Revision History

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: 100 - Clients: 250 - Mode: Read Only

OpenBenchmarking.org metrics for this test profile configuration based on 123 public results since 13 October 2022 with the latest data as of 18 November 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)
99th
5
3475128 +/- 309921
97th
5
3390888 +/- 28133
92nd
5
2643742 +/- 4229
87th
5
2340235 +/- 14055
84th
3
2254419 +/- 21065
81st
3
1994857 +/- 5303
76th
5
1808385 +/- 11946
Mid-Tier
75th
< 1804396
74th
3
1754887 +/- 174782
71st
7
1619723 +/- 172113
68th
7
1529986 +/- 34376
60th
3
1484771 +/- 1068
56th
3
1456134 +/- 12840
54th
5
1343857 +/- 6143
Median
50th
1269757
49th
3
1268940 +/- 1416
44th
3
1070913 +/- 660
42nd
5
1017505 +/- 23635
36th
5
987846 +/- 1585
32nd
5
936094 +/- 4811
28th
3
927163 +/- 15164
Low-Tier
25th
< 878140
20th
5
714556 +/- 2779
15th
4
477052 +/- 537
11th
3
302051 +/- 2234
4th
3
99611 +/- 3711
OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 100 - Clients: 250 - Mode: Read Only123 Results Range From 20630 To 3701462 TPS206309424716786424148131509838871546233253594960956668318375680083041790403497765110512681124885119850212721191345736141935314929701566587164020417138211787438186105519346722008289208190621555232229140230275723763742449991252360825972252670842274445928180762891693296531030389273112544318616132597783333395340701234806293554246362786337014803691215

Based on OpenBenchmarking.org data, the selected test / test configuration (PostgreSQL 15 - Scaling Factor: 100 - Clients: 250 - Mode: Read Only) has an average run-time of 10 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: 250 - Mode: Read OnlyRun-Time612182430Min: 7 / Avg: 9.83 / Max: 29

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: 100 - Clients: 250 - Mode: Read OnlyDeviation246810Min: 0 / Avg: 0.31 / Max: 3

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)
ARMv8 64-bit
aarch64
Ampere ARMv8 Neoverse-N1 128-Core, Ampere ARMv8 Neoverse-N1 256-Core

Recent Test Results

OpenBenchmarking.org Results Compare

1 System - 31 Benchmark Results

AMD Ryzen 7 2700 Eight-Core - ASUS PRIME X470-PRO - AMD 17h

NixOS 22.05 - 5.15.70 - X Server

4 Systems - 30 Benchmark Results

Intel Core i5-4210U - Acer EA50_HB - Intel Haswell-ULT DRAM

Ubuntu 22.04 - 5.15.0-53-generic - Cinnamon 5.2.7

3 Systems - 20 Benchmark Results

Intel Core i5-4210U - Acer EA50_HB - Intel Haswell-ULT DRAM

Ubuntu 22.04 - 5.15.0-53-generic - Cinnamon 5.2.7

1 System - 4 Benchmark Results

AMD EPYC 7413 24-Core - Red Hat RHEL-AV - 16384 + 16384 + 16384 + 16384 + 16384 + 8192 0MHz

Microsoft Windows 10 Pro Build 19044 - 10.0.19044.2251 - 10.0.19041.2075

1 System - 4 Benchmark Results

AMD EPYC 7413 24-Core - Red Hat RHEL-AV - 8 x 16384 MB 0MHz

Microsoft Windows 10 Pro Build 19044 - 10.0.19044.2251 - 516.94

4 Systems - 4 Benchmark Results

2 x AMD Ryzen 9 5950X 16-Core - Intel 440BX - 8192 + 4096 + 2048 + 128 + 32 + 4 0MHz

Microsoft Windows 10 Pro Build 19045 - 10.0.19045.2311 - 8.17.3.5

1 System - 4 Benchmark Results

AMD EPYC 7413 24-Core - Red Hat RHEL-AV - 8 x 16384 MB 0MHz

Microsoft Windows 10 Pro Build 19044 - 10.0.19044.2251 - 516.94

1 System - 4 Benchmark Results

AMD EPYC 7413 24-Core - Red Hat RHEL-AV - 16384 + 16384 + 16384 + 16384 + 16384 + 8192 0MHz

Microsoft Windows 10 Pro Build 19044 - 10.0.19044.2251 - 10.0.19041.2075

2 Systems - 226 Benchmark Results

AMD Ryzen Threadripper 1920X 12-Core - ASRock X399 Taichi - AMD 17h

Ubuntu 22.04 - 5.15.0-50-generic - GNOME Shell 42.4

1 System - 162 Benchmark Results

Intel Celeron J1800 - LENOVO Aptio CRB - 4096MB

Alpine Linux v3.17 3.17.0_rc1 - 5.15.78-0-lts - ext4

2 Systems - 2 Benchmark Results

AMD Ryzen 9 5900X 12-Core - ASRock X570 Taichi Razer Edition - AMD Starship

Debian 11 - 5.10.0-19-amd64 - 1.0.2

3 Systems - 2 Benchmark Results

AMD Ryzen 9 5900X 12-Core - Microsoft Virtual Machine - 3968 MB + 28800 MB

Debian GNU - 5.10.0-19-amd64 - 1.0.2

1 System - 2 Benchmark Results

AMD Ryzen 9 5900X 12-Core - Microsoft Virtual Machine - 3968 MB + 12416 MB

Debian GNU - 5.10.0-19-amd64 - 1.0.2

1 System - 2 Benchmark Results

Intel Pentium Silver N5030 - BESSTAR Tech GB7 - Intel Gemini Lake

Debian 11 - 5.10.0-19-amd64 - 1.2.145

1 System - 2 Benchmark Results

AMD Ryzen 9 5900X 12-Core - ASRock X570 Taichi Razer Edition - AMD Starship

Debian 11 - 5.10.0-19-amd64 - 1.0.2

Most Popular Test Results

OpenBenchmarking.org Results Compare

2 Systems - 226 Benchmark Results

AMD Ryzen Threadripper 1920X 12-Core - ASRock X399 Taichi - AMD 17h

Ubuntu 22.04 - 5.15.0-50-generic - GNOME Shell 42.4

20 Systems - 199 Benchmark Results

2 x Intel Xeon Platinum 8380 - Intel M50CYP2SB2U - Intel Ice Lake IEH

Ubuntu 22.10 - 6.0.0-060000rc3daily20220904-generic - GNOME Shell

4 Systems - 73 Benchmark Results

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

Ubuntu 22.10 - 6.0.0-060000rc7daily20220927-generic - GNOME Shell 43.0

4 Systems - 105 Benchmark Results

Intel Xeon W-2145 - ASUS WS C422 DC - Intel Sky Lake-E DMI3 Registers

AlmaLinux 8.6 - 4.18.0-348.20.1.el8_5.x86_64 - GCC 8.5.0 20210514

2 Systems - 226 Benchmark Results

AMD Ryzen Threadripper 1920X 12-Core - ASRock X399 Taichi - AMD 17h

Ubuntu 22.04 - 5.15.0-50-generic - GNOME Shell 42.4

3 Systems - 58 Benchmark Results

Intel Core i9-12900K - ASUS ROG STRIX Z690-E GAMING WIFI - Intel Alder Lake-S PCH

Ubuntu 22.04 - 5.17.0-1019-oem - GNOME Shell 42.2

4 Systems - 105 Benchmark Results

Intel Xeon W-2145 - ASUS WS C422 DC - Intel Sky Lake-E DMI3 Registers

AlmaLinux 8.6 - 4.18.0-348.20.1.el8_5.x86_64 - GCC 8.5.0 20210514

4 Systems - 105 Benchmark Results

Intel Xeon W-2145 - ASUS WS C422 DC - Intel Sky Lake-E DMI3 Registers

AlmaLinux 8.6 - 4.18.0-348.20.1.el8_5.x86_64 - GCC 8.5.0 20210514

4 Systems - 105 Benchmark Results

Intel Xeon W-2145 - ASUS WS C422 DC - Intel Sky Lake-E DMI3 Registers

AlmaLinux 8.6 - 4.18.0-348.20.1.el8_5.x86_64 - GCC 8.5.0 20210514

3 Systems - 106 Benchmark Results

AMD Ryzen 7 4800U - ASRock 4X4-4000 - AMD Renoir

Ubuntu 22.04 - 5.19.0-rc6-phx-retbleed - GNOME Shell 42.2

1 System - 274 Benchmark Results

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

OracleServer 8.6 - 5.4.17-2136.312.3.4.el8uek.x86_64 - GCC 8.5.0 20210514

3 Systems - 65 Benchmark Results

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

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

1 System - 236 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 - 187 Benchmark Results

Apple M1 - Apple MacBook Pro - 16GB

macOS 11.7 - 20.6.0 - GCC 13.0.0 + Clang 13.0.0

1 System - 274 Benchmark Results

Find More Test Results