Remix.run Logo
Show HN: PostgreSQL performance and cost across 23 EC2 instance types(postgres.saneengineer.com)
52 points by anivan_ 5 hours ago | 6 comments

Hey! I'm Andrei.

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?

nijave 3 minutes ago | parent | next [-]

Would be interesting to see huge pages and io2 impact.

I 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.

crudgen 2 minutes ago | parent | prev | next [-]

Interesting, is there something like this for azure

ballislife30 an hour ago | parent | prev [-]

Would love to see a comparison between Aurora PostgreSQL and self-host PostgreSQL on the same EC2 instance type.

anivan_ an hour ago | parent [-]

Good point! I kept the configuration of the Postgres pretty close to the defaults, and it would be interesting to compare it with the same default Aurora Postgres.

And it should be easy to add - I'll check it, thanks!

toredash 32 minutes ago | parent [-]

I would really see this compared to what AWS is offering via RDS

anivan_ 25 minutes ago | parent [-]

Yes! This was my initial dilemma - whether to test RDS or self-hosted Postgres on EC2. I decided to start with EC2 to be a bit more "pure", and remove cost overhead of RDS.

But support for RDS is my next candidate for development. Plus, comparison would also be interesting.