Show HN: PostgreSQL performance and cost across 23 EC2 instance types (postgres.saneengineer.com)
I got frustrated by how people tend to build overcomplicated backend systems, being "motivated" by big tech case studies and popular books.
So, I started exploring lean architecture, and building my digital garden of ideas, approaches and data that align with this direction.
Here I want to present one of the tools – Sizing tool for PostgreSQL. I've benchmarked PostgreSQL on different EC2 instances and disks, with different initial data sets to see performance that these instances can give you. And I've built a tool to visualize this data, which I welcome you to explore.
So, you can put your usual input parameters, like needed RPS and disk size as input, and find out which instance will be the most cost-efficient for your needs.
You can read about the methodology here: https://postgres.saneengineer.com/about
I've tested one workload – mixed 90/10 read/write, and only selected configurations. But it is extensible, and I (and you – benchmark is open source: https://github.com/anivaniuk/sanebench) can run more configurations to have more data represented.
Does it look interesting? What workload should I benchmark next?
22 comments
[ 2.8 ms ] story [ 28.5 ms ] threadI did a smaller version on Azure and disk latency had a massive impact much more so than max IOPs (although their crappy storage offering needed like 64-128 iodepth to get advertised iops).
Results seem mostly in line with expectations. Iirc vcpu is threads so on arm64 you get 4 smt1 cores vs Intel/AMD you get 2 smt2 cores.
io2 is on my future-work list. And agree, I have the same feelings about IOPS.
It would also be interesting to have cross-provider comparison. I think it's doable. Thanks!
Edit: Apologies, on a closer read, I realize you were not testing RDS but managing Postgres on EC2 directly.
Thanks for highlighting this!
My vision is that there will be more movement in this direction, but still, we need first to understand limits of "easy to work with" databases like Postgres. It's easy to underestimate what Postgres can do.
And only when it's not enough, move to something LSM-tree-based.
Small badges will be helpful, though. I added hovers in some places, like for latency numbers, but I think more visible badges will work better, thanks!
I have a 80GB database serving 10 queries per second on a $8 VPS. It depends on the query though.
Especially, cost-efficiency. I'll think how to put it, thanks :)