Best EC2 Instance for PostgreSQL (Benchmarked) · PostgreSQL on AWS<br>Get notified
Guide<br>Best EC2 instance for PostgreSQL<br>A data-backed answer, from real benchmarks: the best AWS EC2 instance types for self-managed PostgreSQL by price/performance, raw throughput, and cost — measured on a 90% read / 10% write OLTP workload.
Context<br>Workload90% read / 10% write<br>PostgreSQL17<br>Dataset10 GB<br>Storagegp3-baseline<br>Regionus-east-1
Heads up: this covers a limited, hand-picked set of 26 instance types across 8 EC2 families — not every instance AWS offers. Benchmarks last run 2026-07-05 21:48 UTC.<br>TL;DR<br>If you want…PickBecauseBest price/performancem8g.xlarge337,498 req/s per $/hr — the most throughput per dollar of any instance tested.Maximum throughputm8g.2xlarge81,055 req/s, the highest measured — when capacity beats cost.Lowest running costt4g.small$0.0387/hr (~$28/mo) all-in, still serving 2,158 req/s.Best Graviton (Arm)m8g.xlarge337,498 req/s per $/hr — top Arm value.Best Intel (x86)m7i.xlarge282,820 req/s per $/hr — top x86 value.Full ranking by price/performance<br>AWS EC2 instances ranked by PostgreSQL throughput per dollarInstanceArch$/hrRPSp95 msRPS/$RPS/vCPUm8g.xlargearm64$0.2014/hr67,9851.86337,49816,996m7g.xlargearm64$0.1851/hr54,2792.03293,21413,570m7i.xlargex86-64$0.2235/hr63,2151.88282,82015,804r8g.xlargearm64$0.2310/hr64,1101.88277,58116,027r8g.largearm64$0.1264/hr34,3042.46271,31517,152m7g.2xlargearm64$0.3483/hr75,7411.82217,4499,468m8g.2xlargearm64$0.3810/hr81,0551.75212,76710,132m5.xlargex86-64$0.2139/hr39,0762.24182,6699,769m7i.2xlargex86-64$0.4251/hr71,9301.81169,2018,991c8i.2xlargex86-64$0.3968/hr62,1081.86156,5397,764m5.2xlargex86-64$0.4059/hr50,6322.01124,7346,329r8g.mediumarm64$0.0742/hr5,48811.4673,9815,488t3.smallx86-64$0.0427/hr2,47067.4157,8211,235m7g.mediumarm64$0.0627/hr3,54013.7756,4433,540t4g.smallarm64$0.0387/hr2,15868.0655,7471,079m8g.mediumarm64$0.0668/hr3,53713.8152,9523,537m7g.largearm64$0.1035/hr5,46611.8552,8022,733m8g.largearm64$0.1117/hr5,48511.9149,1172,743m5.largex86-64$0.1179/hr5,44711.9046,1922,723m7i.largex86-64$0.1227/hr5,47411.8044,6062,737t4g.largearm64$0.0891/hr3,92458.1644,0261,962t4g.mediumarm64$0.0555/hr2,40567.4243,3161,202t3.mediumx86-64$0.0635/hr2,49067.4039,2031,245t3.largex86-64$0.1051/hr4,04857.4938,5082,024c8i.largex86-64$0.1156/hr3,51713.9330,4141,758c8i.xlargex86-64$0.2093/hr5,45511.7626,0601,364<br>Ranked at a 10 GB dataset on gp3-baseline storage. Want a different size, disk, or workload? Open the interactive sizing tool to re-sort the full dataset, or read the methodology.<br>How to choose<br>There is no single “best” instance — it depends on what you are optimizing. Pick the smallest instance whose throughput clears your real peak (with headroom), then compare its cost-efficiency to the alternatives above. A few rules of thumb from the data:<br>Graviton (Arm) usually wins on cost-efficiency. At comparable throughput it carries a lower hourly price, so it leads the requests-per-dollar ranking for this workload.<br>Right-size to your working set. Throughput holds up while the dataset fits in RAM and drops once it spills to disk — so the winner can change with dataset size. Check your size in the sizing tool.<br>Burstable (t-family) is for spiky, low-average load. The numbers here reflect sustained credit mode; a credit-starved t3/t4g will perform worse under steady load.<br>FAQ<br>What is the best EC2 instance for PostgreSQL?<br>For price/performance, m8g.xlarge (arm64) leads at 337,498 req/s per $/hr. If you need the most raw throughput regardless of cost, m8g.2xlarge is fastest at 81,055 req/s. The right pick depends on whether you are optimizing for cost-efficiency or peak capacity.
Is AWS Graviton (Arm) faster than Intel (x86) for PostgreSQL?<br>In these benchmarks the best Graviton (Arm) instance, m8g.xlarge, delivers 337,498 req/s per $/hr versus 282,820 req/s per $/hr for the best Intel/x86 instance, m7i.xlarge. Graviton generally wins on cost-efficiency for this PostgreSQL workload because of its lower hourly price at comparable throughput.
How much does it cost to run PostgreSQL on EC2?<br>The cheapest benchmarked instance, t4g.small, costs $0.0387/hr (~$28/mo) including its gp3 EBS volume, while sustaining 2,158 req/s. Cost scales with instance size; compare the full table to find the smallest instance that meets your throughput target.
What workload were these PostgreSQL benchmarks run on?<br>A mixed OLTP pattern — 90% random primary-key reads and 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. Full methodology is published, and the harness is open source.
Keep comparing<br>Graviton vs Intel for PostgreSQL<br>m7g vs m7i<br>m8g vs r8g<br>Browse all benchmark data
Data is generated on July 5, 2026 at 09:48 PM UTC