Performance benchmarks
Real numbers,
benchmarked in the open.We benchmarked Selfhost.dev managed PostgreSQL and Redis on AWS with production settings on and no benchmark-specific tuning. Not a cherry-picked demo: here are the methodology, the numbers, and what we did not test.
*Same AWS instance class, at our all-in pay-as-you-go price. RDS figures estimated, not measured.
Want these numbers for your own setup? Get a free cost audit →PostgreSQL results
Throughput and latency,
on real instances.
r6g.large 16 GB / 2 vCPU / ARM Graviton
$66.52/mo| Clients | TPS | Latency |
|---|---|---|
| 4 | 5,447 | 0.73 ms |
| 16 | 18,811 | 0.85 ms |
| 32 | 29,457 | 1.09 ms |
| 50 | 28,662 | 1.74 ms |
| 100 | 21,495 | 4.65 ms |
| 200 | 19,566 | 10.2 ms |
| Clients | TPS | Latency |
|---|---|---|
| 2 | 351 | 5.7 ms |
| 4 | 673 | 5.9 ms |
| 8 | 1,262 | 6.3 ms |
| 16 | 2,111 | 7.4 ms |
| 32 | 3,251 | 9.8 ms |
Dataset scale 10 vs scale 200 (~3 GB) stayed within 2%: cache absorbs 20x dataset growth. Reads peak near 32 clients, then taper on 2 vCPU. PgBouncer is recommended above ~100 concurrent clients.
t3.micro 1 GB / 2 vCPU burstable / x86
$13.50/mo| Clients | TPS | Latency |
|---|---|---|
| 4 | 4,321 | 0.93 ms |
| 16 | 15,819 | 1.01 ms |
| 32 | 30,252 | 1.06 ms |
| 50 | 31,485 | 1.59 ms |
| 100 | 22,864 | 4.37 ms |
| Clients | TPS | Latency |
|---|---|---|
| 2 | 268 | 7.5 ms |
| 4 | 520 | 7.7 ms |
| 8 | 940 | 8.5 ms |
| 16 | 1,516 | 10.5 ms |
Burstable: 60s runs ride accumulated CPU credits, so sustained baseline is lower. A $13.50/mo instance still serves tens of thousands of cached reads per second.
Price-performance vs RDS
Same hardware.
About 2.8x less to run.
The same AWS instance class as RDS, at our all-in pay-as-you-go price, lands around 2.8x cheaper at comparable throughput and the same durability defaults. And where RDS meters IOPS and egress as separate surprise line items, our price-performance above is all-in. Plus tuning, pooling, and an AI control layer RDS does not have.
- ✓ Auto RAM-aware tuning at provision time (RDS: manual)
- ✓ Config guardrails that reject unsafe overrides
- ✓ Built-in PgBouncer (RDS Proxy is an extra charge)
- ✓ Real-time telemetry and 150+ MCP tools
- ✓ Always-on instances, no cold-start penalty
Want this price-performance with the data in your own AWS account? BYOC runs the same instance in your own cloud.
See the full RDS comparison. RDS pricing estimated, not measured. The chart uses raw list prices; the ~2.8x headline uses our final all-in price, which is the number to plan on.
How we tested PostgreSQL
Durability on.
Nothing tuned for the benchmark.
A benchmark is only worth trusting if it runs your production settings. Ours did: full durability, PostgreSQL defaults plus our automatic tuning, and no benchmark-only knobs.
- pgbench 18.4, -M prepared, -j 4
- Dedicated EC2 runner, cross-VPC, same region
- 3 iterations x 60s, median reported, 15s warmup discarded
- 20 GB gp3 (3000 IOPS, 125 MB/s), PostgreSQL 18.4
Honesty is part of the point. These are open gaps, not hidden ones.
- - Latency percentiles (p95 / p99); we report median and average only
- - A measured RDS head-to-head; RDS numbers are estimates
- - IO-bound workloads larger than RAM
- - HA failover and replication under load
- - PgBouncer-fronted high-concurrency runs
Managed Redis
Sub-millisecond reads,
up to 230k ops a second.
Managed Redis 7 on a single r7g.large, measured with memtier over a real cross-VPC network path, the way a client actually connects. We report full latency percentiles, P50 through P99.9, not just an average.
*Same r7g.large class. ElastiCache cache.r7g.large at AWS on-demand list (~$165/mo) vs our $76.47/mo. Estimated, not measured.
r7g.large 16 GB / 2 vCPU / ARM Graviton3 / Redis 7
$76.47/mo| Pipeline | Clients | Ops/sec | P50 | P95 | P99 | P99.9 |
|---|---|---|---|---|---|---|
| 1 | 1 | 5,872 | 0.65 | 0.72 | 0.88 | 2.38 |
| 1 | 200 | 75,992 | 9.47 | 15.10 | 38.14 | 70.14 |
| 64 | 1 | 230,293 | 1.03 | 1.54 | 1.91 | 3.31 |
| 64 | 200 | 225,895 | 211.97 | 311.30 | 507.90 | 638.98 |
Median of 3 x 60s runs. A single non-pipelined connection holds a 0.88 ms P99; batching 64 commands per round-trip lifts throughput to 230k ops/sec. The last row is the deliberate stress corner: 64-deep pipelines across 200 connections queue on 2 vCPU, so latency climbs (P50 around 212 ms) while throughput stays flat. For latency-sensitive traffic, keep pipelines shallow.
Price-performance vs ElastiCache
Same class.
About 2.1x less to run.
Same r7g.large class and Redis 7, at comparable throughput. ElastiCache cache.r7g.large at AWS on-demand list price, estimated, not measured. Run Redis on Selfhost.dev.
- 1 KB values, 8M keys (~8 GB), 1:4 read:write, Gaussian
- Pipeline x clients sweep, 3 x 60s, median reported
- Dataset held in RAM, no maxmemory set
- Latency measured in-region, cross-VPC, over public IP
- - A measured ElastiCache head-to-head; their price is a list estimate
- - Workloads larger than RAM, or eviction under memory pressure
- - Cluster-mode (multi-shard) horizontal scale-out
- - Read-replica fan-out under load