# pgbench

> Database benchmark workloads: PostgreSQL heavy read-only throughput, PostgreSQL heavy read-only peak throughput and 1 more.

Database

## PostgreSQL heavy read-only throughput {#pgbench-heavy_read_only}

Measures PostgreSQL throughput with a remote pgbench client against a custom, cache-resident, read-only transaction (joins, aggregates, full-text search, arrays, regex, TOAST) that fits in shared\_buffers, so the score reflects engine CPU and memory behavior rather than disk or network. Server and client run in the same availability zone. Servers use pgtune-style host GUCs, while DBaaS keep the vendor-managed config. Each score is TPM at a given client concurrency; the typical profile is 1, vCPUs/2, vCPUs, and 2\*vCPUs (additional points may be present). This is a synthetic proxy for relative RDBMS performance across server types, not a prediction of any specific application's throughput.

Benchmark details<dl><dt>Benchmark ID</dt><dd><code>pgbench:heavy_read_only</code></dd><dt>Unit of measurement</dt><dd>Transactions per minute (TPM)</dd><dt>Server types evaluated</dt><dd>825</dd><dt>Total measurements</dt><dd>3,150</dd><dt>Range of measurements</dt><dd>32 – 37.1K <small>TPM</small></dd><dt>Better</dt><dd>↑ Higher is better</dd></dl>

Configuration options

| Field | Description | Example values |
| --- | --- | --- |
| `concurrency` | Parallel client query count (integer). Typical profile: 1, vCPUs/2, vCPUs, and 2\*vCPUs (may include additional points). | `1` `2` `3` `4` `6` `7` `8` `10` `11` `12` `14` `15` `16` `18` `19` `20` `22` `24` `28` `30` `32` `36` `38` `40` `44` `45` `48` `52` `56` `60` `64` `72` `76` `80` `88` `90` `96` `104` `112` `120` `128` `144` `160` `176` `180` `192` `208` `224` `256` `288` `320` `360` `384` `448` `576` `720` `768` |

Score distribution <small>(3,150 measurements)</small>

![Score distribution of PostgreSQL heavy read-only throughput](/benchmarks/histograms/pgbench-heavy_read_only.svg)

## PostgreSQL heavy read-only peak throughput {#pgbench-heavy_read_only-peak}

Maximum PostgreSQL throughput over the pgbench concurrency profile (typically 1, vCPUs/2, vCPUs, and 2\*vCPUs) with a remote client against a custom, cache-resident, read-only transaction (joins, aggregates, full-text search, arrays, regex, TOAST) that fits in shared\_buffers. Server and client run in the same availability zone. Servers use pgtune-style host GUCs, while DBaaS keep the vendor-managed config. This is a synthetic proxy for relative RDBMS performance across server types, not a prediction of any specific application's throughput.

Benchmark details<dl><dt>Benchmark ID</dt><dd><code>pgbench:heavy_read_only:peak</code></dd><dt>Unit of measurement</dt><dd>Transactions per minute (TPM)</dd><dt>Server types evaluated</dt><dd>825</dd><dt>Total measurements</dt><dd>825</dd><dt>Range of measurements</dt><dd>45 – 37.1K <small>TPM</small></dd><dt>Better</dt><dd>↑ Higher is better</dd></dl>

Score distribution <small>(825 measurements)</small>

![Score distribution of PostgreSQL heavy read-only peak throughput](/benchmarks/histograms/pgbench-heavy_read_only-peak.svg)

## PostgreSQL heavy read-only baseline (single connection) {#pgbench-heavy_read_only-single}

Baseline PostgreSQL throughput with a single remote pgbench client connection against a custom, cache-resident, read-only transaction (joins, aggregates, full-text search, arrays, regex, TOAST) that fits in shared\_buffers. Server and client run in the same availability zone. Servers use pgtune-style host GUCs, while DBaaS keep the vendor-managed config. Useful for comparing per-session engine and CPU efficiency across server types and sizes, because the score does not necessarily scale with extra vCPUs the way peak throughput does. This is a synthetic proxy for relative RDBMS performance, not a prediction of any specific application's throughput.

Benchmark details<dl><dt>Benchmark ID</dt><dd><code>pgbench:heavy_read_only:single</code></dd><dt>Unit of measurement</dt><dd>Transactions per minute (TPM)</dd><dt>Server types evaluated</dt><dd>825</dd><dt>Total measurements</dt><dd>825</dd><dt>Range of measurements</dt><dd>38 – 299 <small>TPM</small></dd><dt>Better</dt><dd>↑ Higher is better</dd></dl>

:::warning

This benchmark is measured with a single client session, so throughput does not necessarily grow with vCPU count. On the other hand, it is not a purely single-threaded metric, as the server may still engage multiple cores (e.g. parallel request handlers and background processes). Use it as a per-session efficiency baseline rather than a measure of instance capacity.

:::

Score distribution <small>(825 measurements)</small>

![Score distribution of PostgreSQL heavy read-only baseline (single connection)](/benchmarks/histograms/pgbench-heavy_read_only-single.svg)
