PostgreSQL Performance Testing – Aurora RDS vs. Google’s AlloyDB Omni
Bottom line: save money and improve performance on your journey from AWS to GCP. Our initial tests show Google’s PostgreSQL AlloyDB Omni running on EC2 performs better than Aurora, and you can take advantage of RI’s.
Last year, Google released AlloyDB, an infrastructure for hosting PostgreSQL databases that leverages the scalable, reliable, and secure computing first principles invented and perfected for decades at Google Search. At the time of launch, we ran a pgbench test comparing performance between AWS Aurora and AlloyDB and wrote about it here.
AlloyDB Omni is a new release from Google that allows you to run the engine anywhere, so we decided to re-run our test from last year – changing to run AlloyDB Omni on EC2 within AWS – so it’s all AWS infra.
Here’s the side by side continuous performance test results – Aurora consistently takes 20s and Omni takes 12s:
Aurora RDS vs. GCP’s AlloyDB
The tests are scheduled to continuously run pgbench against any database and write the latency and queries per seconds metrics to stdout which we display as charts in Google’s Console – this helps clients to see any changes over time due to infrastructure variations.
The queries used for the test involved SQL window functions that compute moving averages and customer lifetime values – these are known as analytical queries and are where AlloyDB is engineered to perform better than Aurora. In our simple test, AlloyDB Omni running on EC2 performed 40% faster than Aurora.
Others in the database benchmarking industry are publishing rigorous studies of AlloyDB Omni’s performance. That said, the only performance that matters to us is how AlloyDB performs with our client’s databases and queries. Our team has made that answerable for you in a few short days.
Contact us to get started – Let’s get you there!
Test Specifications
Databases:
- AWS Aurora instance: db.t3.medium (2 vCPU, 4GiB memory)
- EC2 AlloyDB Omni: c5.large (2 vCPU, 4GiB memory)
- Data: TPC-H 2GB database
pgbench clients:
- AWS VM: t2.small (1 vCPU, 2 GiB memory)
- GCP Cloud run: (1 vCPU, 2 GiB memory)
- pgbench config: number_of_clients=1, number_of_threads=1, number_of_transactions=10
pgbench test query: