ClickHouse Launches PostgresBench: An Open, Reproducible Benchmark for Managed Postgres Services

ClickHouse has open-sourced PostgresBench, a benchmark framework for comparing managed PostgreSQL services. The benchmark uses the standard pgbench tool with a TPC-B-like workload, testing five services at two data sizes (100 GB and 500 GB). All results, configurations, and scripts are public on GitHub.

Why a New Benchmark?

ClickHouse's managed Postgres service is new. To prove its performance claims, the team wanted a transparent methodology—just like they did with ClickBench for OLAP databases. The goal: any developer can reproduce results, submit improvements, or flag issues.

Benchmark Design

PostgresBench runs pgbench with 256 concurrent clients and 16 threads for 10 minutes. The command:

pgbench -c 256 -j 16 -T 600 -M prepared -P 30 \
  -s $SCALE_FACTOR \
  -h $PGHOST -p $PGPORT -U $PGUSER -d $PGDATABASE

Two scale factors: 6849 (~100 GB) and 34247 (~500 GB). These represent small and medium deployments where the working set fits in cache or starts spilling to disk.

Metrics reported: average TPS, average latency, P95, and P99 latency across three runs per configuration.

Tested Services and Configurations

  • Postgres managed by ClickHouse (m8gd.xlarge: 4 vCPU/16 GB NVMe; m8gd.4xlarge: 16 vCPU/64 GB NVMe)
  • AWS Aurora PostgreSQL (db.r6gd.xlarge: 4 vCPU/32 GB NVMe; db.r6g.4xlarge: 16 vCPU/128 GB)
  • AWS RDS for PostgreSQL (db.m8gd.xlarge: 4 vCPU/16 GB NVMe + 1000 GB GP3; db.m8gd.4xlarge: 16 vCPU/64 GB)
  • Neon (Serverless: 4 vCPU/16 GB and 16 vCPU/64 GB)
  • Crunchy Bridge (Standard-16: 4 vCPU/16 GB with 6K baseline IOPS; Standard-64: 16 vCPU/64 GB with 20K IOPS)

All tests ran in us-east-2 with HA disabled, using Postgres 17 or 18 (Aurora on 17).

Results at 100 GB (Scale Factor 6849)

ServiceTPSAvg Latency (ms)P95 (ms)P99 (ms)
ClickHouse Small617241.4664.0280.89
ClickHouse Large286688.9010.2311.68
Aurora Small268595.29165.54298.39
Aurora Large1262820.2430.9739.04
RDS Small488252.4198.00124.19
RDS Large813331.4372.5097.68
Neon Small284789.90106.14116.47
Neon Large856329.8341.4249.21
Crunchy Small633840.3766.1085.83
Crunchy Large1479017.2628.3234.61

Results at 500 GB (Scale Factor 34247)

ServiceTPSAvg Latency (ms)P95 (ms)P99 (ms)
ClickHouse Large263289.7011.4013.19
Aurora Large1040224.5836.1746.49
RDS Large509250.2388.65117.90
Neon Large780232.8047.5356.30
Crunchy Large1111322.9936.4041.68

Why NVMe Matters

The TPC-B workload is write-heavy due to continuous UPDATEs generating WAL records. ClickHouse's NVMe storage is physically co-located with compute, delivering microsecond disk latency. In contrast, EBS-backed volumes add network latency to every fsync. The article states: "Most of the time, Postgres isn’t slow, your storage is."

How to Reproduce

Clone the repository and run:

export PGHOST="your-database-host"
export PGPORT=5432
export PGUSER="postgres"
export PGPASSWORD="your-password"
export PGDATABASE="postgres"
export VCPUS=16
export RAM_GB=64
export SYSTEM_NAME="Postgres by ClickHouse"
export INSTANCE_TYPE="m8gd.4xlarge"
export INSTANCE_STORAGE="950 GB - NVMe"
export PRIMARY_STORAGE="NVMe"
export OUT_JSON="results.json"
./run.sh

The script initializes data, runs the benchmark three times, and outputs JSON. Submit results via PR.

What's Next

  • Pricing comparisons are not included (ClickHouse's service wasn't public at test time).
  • Future plans: HA configurations, custom Postgres configs, and colocation by availability zone.
  • Contributions welcome to expand the benchmark.