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

14 September 2023

Test Maintainer

Michael Larabel 

Test Type

System

Average Install Time

1 Minute, 12 Seconds

Average Run Time

5 Minutes, 37 Seconds

Test Dependencies

C/C++ Compiler Toolchain + BC

Accolades

300k+ Downloads + 10k+ Public Benchmark Results + Recently Updated Test Profile

Supported Platforms


Public Result Uploads *Reported Test Completions **Reported Installs **Test Profile Page Views ***OpenBenchmarking.orgEventsPostgreSQL pgbench Popularity Statisticspts/pgbench2010.122011.052011.102012.032012.082013.012013.062013.112014.042014.092015.022015.072015.122016.052016.102017.032017.082018.012018.062018.112019.042019.092020.022020.072020.122021.052021.102022.032022.082023.012023.06200K400K600K800K1000K
* 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 updated weekly as of 26 September 2023.
142.8%100014.5%10042.7%Scaling Factor Option PopularityOpenBenchmarking.org
10017.5%100017.0%25018.1%508.0%50019.6%80019.7%Clients Option PopularityOpenBenchmarking.org
Read Write48.0%Read Only52.0%Mode Option PopularityOpenBenchmarking.org

Revision History

pts/pgbench-1.14.0   [View Source]   Thu, 14 Sep 2023 16:25:36 GMT
Update against PostgreSQL 16 upstream.

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

Database Test Suite

C/C++ Compiler Tests

Server

Common Kernel Benchmarks

Multi-Core

CPU Massive


Performance Metrics

Analyze Test Configuration:

PostgreSQL 16

Scaling Factor: 100 - Clients: 800 - Mode: Read Only

OpenBenchmarking.org metrics for this test profile configuration based on 52 public results since 14 September 2023 with the latest data as of 19 September 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
TPS (Average)
98th
4
3678380 +/- 108359
90th
4
3404536 +/- 23227
78th
4
3054685 +/- 11666
Mid-Tier
75th
< 3050704
53rd
5
1658231 +/- 9807
Median
50th
1652713
36th
5
1206362 +/- 10838
Low-Tier
25th
< 915964
19th
4
874087 +/- 7120
13th
3
398615 +/- 32790
5th
4
353955 +/- 31659
OpenBenchmarking.orgDistribution Of Public Results - Scaling Factor: 100 - Clients: 800 - Mode: Read Only50 Results Range From 319441 To 3772221 TPS31944138849745755352660959566566472173377780283387188994094510100011079057114811312171691286225135528114243371493393156244916315051700561176961718386731907729197678520458412114897218395322530092322065239112124601772529233259828926673452736401280545728745132943569301262530816813150737321979332888493357905342696134960173565073363412937031853772241246810

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

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 September 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

6 Systems - 69 Benchmark Results

AMD Ryzen 7 2700 Eight-Core - ASRock X370 Taichi - AMD 17h

Debian - 6.4.0-4-amd64 - KDE Plasma 5.27.7

14 Systems - 67 Benchmark Results

2 x Intel Xeon Gold 5218 - Lenovo-[7X06CTO1WW] v07 - Intel Sky Lake-E DMI3 Registers

Red Hat Enterprise Linux 9.2 - 5.14.0-284.25.1.el9_2.x86_64 - X Server

13 Systems - 67 Benchmark Results

Intel Xeon Gold 5218 - Lenovo-[7X06CTO1WW] v07 - Intel Sky Lake-E DMI3 Registers

Red Hat Enterprise Linux 9.2 - 5.14.0-284.25.1.el9_2.x86_64 - X Server

1 System - 2 Benchmark Results

AMD Ryzen 5 5600G - Gigabyte B450M DS3H WIFI-CF - AMD Renoir

ArcoLinux rolling - 6.5.4-zen2-1-zen - KDE Plasma 5.27.8

12 Systems - 67 Benchmark Results

Intel Xeon Gold 5218 - Lenovo-[7X06CTO1WW] v07 - Intel Sky Lake-E DMI3 Registers

Red Hat Enterprise Linux 9.2 - 5.14.0-284.25.1.el9_2.x86_64 - X Server

1 System - 57 Benchmark Results

2 x Intel Xeon Silver 4416+ - Dell PowerEdge R760xa [0CRRF2] - Intel Device 1bce

Ubuntu 18.04 - 5.4.0-150-generic - GNOME Shell 3.28.4

1 System - 69 Benchmark Results

2 x Intel Xeon Silver 4416+ - Dell PowerEdge R760 [0NH8MJ] - Intel Device 1bce

Ubuntu 18.04 - 5.4.0-150-generic - GNOME Shell 3.28.4

11 Systems - 67 Benchmark Results

2 x Intel Xeon Gold 5218 - Lenovo-[7X06CTO1WW] v07 - Intel Sky Lake-E DMI3 Registers

Red Hat Enterprise Linux 9.2 - 5.14.0-284.25.1.el9_2.x86_64 - X Server

1 System - 328 Benchmark Results

10 Systems - 67 Benchmark Results

2 x Intel Xeon Gold 5218 - Lenovo-[7X06CTO1WW] v07 - Intel Sky Lake-E DMI3 Registers

Red Hat Enterprise Linux 9.2 - 5.14.0-284.25.1.el9_2.x86_64 - X Server

1 System - 43 Benchmark Results

2 x Intel Xeon Silver 4416+ - Dell PowerEdge R760xa [0CRRF2] - Intel Device 1bce

Ubuntu 18.04 - 5.4.0-150-generic - GNOME Shell 3.28.4

9 Systems - 67 Benchmark Results

Intel Xeon Gold 5218 - Lenovo-[7X06CTO1WW] v07 - Intel Sky Lake-E DMI3 Registers

Red Hat Enterprise Linux 9.2 - 5.14.0-284.25.1.el9_2.x86_64 - X Server

3 Systems - 29 Benchmark Results

AMD Ryzen 7 2700 Eight-Core - ASRock X370 Taichi - AMD 17h

Debian - 6.4.0-4-amd64 - KDE Plasma 5.27.7

3 Systems - 28 Benchmark Results

AMD Ryzen 7 2700 Eight-Core - ASRock X370 Taichi - AMD 17h

Debian - 6.4.0-4-amd64 - KDE Plasma 5.27.7

3 Systems - 26 Benchmark Results

AMD Ryzen 7 2700 Eight-Core - ASRock X370 Taichi - AMD 17h

Debian - 6.4.0-4-amd64 - KDE Plasma 5.27.7

Most Popular Test Results

OpenBenchmarking.org Results Compare

5 Systems - 60 Benchmark Results

AMD EPYC 9754 128-Core - AMD Titanite_4G - AMD Device 14a4

Ubuntu 23.10 - 6.5.1-060501-generic - GNOME Shell

3 Systems - 48 Benchmark Results

AMD Ryzen 7 PRO 7840U - LENOVO 21K5001JUS - AMD Device 14e8

Ubuntu 23.10 - 6.5.1-060501-generic - GNOME Shell

5 Systems - 46 Benchmark Results

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

Ubuntu 22.04 - 6.5.3-060503-generic - GNOME Shell 42.9

4 Systems - 60 Benchmark Results

AMD Ryzen 9 7900 12-Core - ASRockRack B650D4U-2L2T/BCM - AMD Device 14d8

Ubuntu 22.04 - 6.6.0-060600rc1daily20230913-generic - GNOME Shell 42.9

5 Systems - 60 Benchmark Results

AMD EPYC 9684X 96-Core - AMD Titanite_4G - AMD Device 14a4

Ubuntu 23.10 - 6.6.0-060600rc1-generic - X Server 1.21.1.7

5 Systems - 40 Benchmark Results

AMD Ryzen 9 7950X 16-Core - ASUS ROG STRIX X670E-E GAMING WIFI - AMD Device 14d8

Ubuntu 23.04 - 6.5.0-060500daily20230909-generic - GNOME Shell 44.3

1 System - 60 Benchmark Results

AMD EPYC 9754 128-Core - AMD Titanite_4G - AMD Device 14a4

Ubuntu 23.10 - 6.5.1-060501-generic - GNOME Shell

4 Systems - 60 Benchmark Results

2 x AMD EPYC 9334 32-Core - Supermicro H13DSH - 24 x 32 GB DDR5-4800MT

AlmaLinux 9.2 - 5.14.0-284.25.1.el9_2.x86_64 - GCC 11.3.1 20221121

1 System - 332 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

1 System - 95 Benchmark Results

AMD EPYC 7763 64-Core - AMD DAYTONA_X - AMD Starship

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

1 System - 304 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 - 134 Benchmark Results

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

Ubuntu 23.04 - 6.2.0-32-generic - GNOME Shell 44.0

1 System - 95 Benchmark Results

AMD EPYC 7763 64-Core - AMD DAYTONA_X - AMD Starship

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

1 System - 304 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

Find More Test Results