3 ms·
PostgresBench: A Reproducible Benchmark for Postgres Services
- whitepoplar 4mo agoI'm curious to know how PlanetScale Postgres would fare.
- karlmush 4mo agoMe too! Were they left out on purpose?
- saisrirampur 4mo agoIt wasn’t left out on purpose, it was just prioritization, we chose 5 that most commonly came up. Please feel free to submit a PR, it should be pretty straightforward.
- samlambert 4mo agoWe have seen them benchmarking us before. I assume we won because they didn't include
- saisrirampur 4mo agoIt could be the other way round too. ;) We just limited the number of Postgres providers in the first batch. May add you in the next and might ping you before sharing it in public, just to make you sure you are aligned and like them.
- schultzer 4mo agoWhile it’s important to focus on the backend itself, why don’t anyone focus on the clients which talk to the databases, it is there most of an applications problem starts also in regards to performance.
- __s 4mo agoLack of protocol compression is painful with postgres
- psc007 4mo agoTldr? Can I use this to benchmark my own CNPG on k8s to see if there is improvement to be made on the deployment?
- saisrirampur 4mo agoYes, you absolutely can. It takes 15 mins to run the benchmark amd get results.
- aurareturn 4mo agoI was just looking for something like this. I think there is a lack of benchmarks between Postgres cloud instances across different clouds. They all offer the same features mostly and cost about the same, but we don't know how they perform.
- datadrivenangel 4mo agoIf I had ~$10,000k to burn, I would give Claude Code an AWS account and this benchmark and have it generate parameter spaces and optimize the configuration for transaction processing by just changing the configuration.
- paulddraper 4mo agoYou could do an enormous number of things for $10,000k.
- cuu508 4mo agoIt would be interesting to see vanilla postgres on a VPS and vanilla postgres on a bare metal server included too. I understand it's apples and oranges, but would it be slower, would it be faster, by how much?
- nwhnwh 4mo agoIt doesn't matter if it is apples and oranges, as long as it is an option customers care about. So, I hope that would be included too.
- saisrirampur 4mo agoGood feedback, we will aim to include them in the future.
- ahachete 4mo agoMy 2 cents: > Each run lasts 10 minutes, long enough to move past warmup and capture stable throughput But short enough not to show the effect of checkpoints (which is quite noticeable). It's not representing a realistic workload. I'd use at the very least 30mins with checkpoint_timeout=5mins so you get at least 6 checkpoint cycles. > We report average TPS, average latency, P95 latency, and P99 latency Unless I'm mistaken, only average TPS is reported, but not TPS over time. Again, it varies a lot (especially due to checkpoints!) and you need variation over time to understand patterns and determine SLAs. > We tested two scale factors: 6849 (~100 GB) and 34247 (~500 GB). I'd set them an order of magnitude apart (100GB and 1TB). 1TB+ is nowadays not unseen and therefore represents a step into the scale path that I believe should also be compared. > While all services offer high availability, the underlying architectures differ. Some use standby replication, others use shared or distributed storage layers. Since we are focused on single-node compute and storage performance, we tested without HA enabled to isolate that. So again, it's not realistic. The impact of HA in production is quite measurable in performance, especially if semi-sync is used. But more importantly, you are comparing systems that are already redundant and highly available (e.g. Aurora, writing six copies of the data) with a single-instance one writing (if I'm not mistaken) to an ephemeral local NVMe. This is watermelons to grapes comparison (I assume HA CH clusters talk over the network for each confirmed transaction; but here they only go to local NVMe). > Default Postgres configuration I believe this is a mistake. Postgres must be tuned (at least to a reasonable degree) and try to homogenize the configuration across the tested systems. Otherwise you are not benchmarking Postgres, but rather the conservationism in the decisions of the default configurations of the managed services. > We did not compare pricing. So you leave the fun part out? > Systems included I miss a self-managed EC2 cluster (with local NVMe) for comparison.
- saisrirampur 4mo agoAck on most points i.e. duration, scale factor (data size) and pricing. We will try incorporating these in the next iterations. In regards to HA, partly agreed. We are working on adding HA setup as we speak, should be released soon. However note that the local NVMe setup does have backups and WAL-archival to S3, which provides data-durability with RPO of 10s of seconds. Even with HA setup I expect performance difference to be similar across systems (may be slightly lesser), as round-trip to secondary is common across most other services except Neon, whose reliability/availability story hasn’t been a strong area in general. In regards to default configs, that was intentional as default tuning is a differentiation across services and that needs to be measured. However we plan to add more configurability on postgres tuning in the future. Appreciate your feedback, super helpful!
- karlmush 4mo agoIt’s a nice project, but it doesn’t seem like the open-source community has really picked it up yet. It’s been live since May, but there aren’t many GitHub stars so far and contributors.