Comparison
m5 vs m7i vs m8g for PostgreSQL
The general-purpose upgrade path for PostgreSQL on EC2: older Intel m5, current Intel m7i, and Graviton4 m8g — what each generation buys you in throughput and cost-efficiency.
Verdict
For this PostgreSQL workload, m8g.2xlarge (arm64) is the best value at 212,767 req/s per $/hr — a 26% cost-efficiency lead over m7i.2xlarge. The highest raw throughput comes from m8g.2xlarge at 81,055 req/s. Across architectures, the best Arm option (m8g.2xlarge) leads the best x86 option (m7i.2xlarge) by 26% on cost-efficiency.
Side by side
| Instance | Arch | $/hr | RPS | p95 ms | RPS/$ | RPS/vCPU |
|---|---|---|---|---|---|---|
| m8g.2xlarge | arm64 | $0.3810/hr | 81,055 | 1.75 | 212,767 | 10,132 |
| m7i.2xlarge | x86-64 | $0.4251/hr | 71,930 | 1.81 | 169,201 | 8,991 |
| m5.2xlarge | x86-64 | $0.4059/hr | 50,632 | 2.01 | 124,734 | 6,329 |
Measured at a 10 GB dataset on gp3-baseline storage. Open the sizing tool to change the dataset size, disk, or metric, or browse the full benchmark data.
Frequently asked questions
Which is better for PostgreSQL, m5.2xlarge or m7i.2xlarge or m8g.2xlarge?
On cost-efficiency, m8g.2xlarge leads at 212,767 req/s per $/hr. For raw throughput, m8g.2xlarge is fastest at 81,055 req/s. Across architectures, the best Arm option (m8g.2xlarge) leads the best x86 option (m7i.2xlarge) by 26% on cost-efficiency. Choose by whether you optimize for throughput per dollar or peak capacity.
m8g.2xlarge vs m7i.2xlarge: what's the difference for PostgreSQL?
m8g.2xlarge delivers 81,055 req/s at 212,767 req/s per $/hr; m7i.2xlarge delivers 71,930 req/s at 169,201 req/s per $/hr. That is a 26% cost-efficiency edge for m8g.2xlarge on this workload.
What workload and configuration were these numbers measured on?
A mixed OLTP pattern — 90% primary-key reads, 10% single-row inserts — at 32 concurrent connections on PostgreSQL 17 in us-east-1, with a 10 GB dataset on a gp3-baseline gp3 volume. The benchmark harness is open source.