DigitalOcean is a cost-effective cloud provider that caters to, and is widely adopted by the developer community. ScaleGrid is a fully managed DBaaS that supports MySQL, PostgreSQL and Redis™, along with additional support for MongoDB® database and Greenplum® database. Along with many popular cloud providers, DigitalOcean also provides a Managed Databases service. They support PostgreSQL, MySQL and Redis, but for the sake of this article, we are going to focus on their PostgreSQL product. So, which database service is right for your application? In this post, we are going to compare the performance and pricing of DigitalOcean PostgreSQL vs. ScaleGrid PostgreSQL to help you determine the best PostgreSQL hosting service on DigitalOcean.
Compare PostgreSQL DigitalOcean Performance
PostgreSQL is one of the fastest growing databases, and #4 database in the world by popularity. As an open source database, it’s a highly popular choice for enterprise applications looking to modernize their infrastructure and reduce their total cost of ownership, along with startup and developer applications looking for a powerful, flexible and cost-effective database to work with.
PostgreSQL DigitalOcean Performance Test
In order to see which DBaaS provides the best PostgreSQL hosting performance on DigitalOcean, we are comparing equivalent plan sizes between ScaleGrid PostgreSQL on DigitalOcean and DigitalOcean Managed Databases:
ScaleGrid PostgreSQL | DigitalOcean PostgreSQL | |
---|---|---|
Instance Type/RAM | Large - 16GB RAM | 16GB RAM |
Storage | 300GB | 270GB |
Deployment Type | Single Node | Single Node |
DigitalOcean Region | SFO3 | SFO3 |
Monthly Cost (USD) | $240 | $240 |
As you can see above, the monthly cost and cluster RAM configurations we are using for ScaleGrid and DigitalOcean are the exact same. Now, let’s take a look at the throughput and latency performance of our comparison.
Throughput
We measure PostgreSQL throughput in terms of transactions processed. Throughput in general is the rate at which something is processed, and in terms of PostgreSQL, this is the number of transactions per second (TPS) your application can handle.
ScaleGrid PostgreSQL provides 68% higher throughput for write-intensive workloads and 94% higher throughput for balanced workloads on average compared to DigitalOcean for PostgreSQL. |
This means that ScaleGrid is able to process almost 2x the amount of transactions as DigitalOcean across the same deployment configurations!
Latency
Next, we are going to test and compare the latency performance between ScaleGrid and DigitalOcean for PostgreSQL. Latency is the average transaction execution time of your PostgreSQL data. Here is how both providers performed across workload types for the PostgreSQL configurations outlined above:
ScaleGrid PostgreSQL provides on average 42.3% lower latency across all workload types compared to DigitalOcean for PostgreSQL. |
While the performance is significantly better across the board, the most noticeable improvement can be seen in the balanced workload scenario where they achieved over 48% lower latency than DigitalOcean Managed Databases.
Analysis
As we can tell from the above graphs, ScaleGrid PostgreSQL can help you achieve almost 2x better performance in terms of both throughput and latency across these common workload scenarios:
PostgreSQL DigitalOcean Throughput Averages | ScaleGrid | DigitalOcean | ScaleGrid Improvement |
---|---|---|---|
Read-Intensive | 3,328 | 2,056 | 61.9% |
Balanced Workload | 7,998 | 4,121 | 94.1% |
Write-Intensive | 4,584 | 2,736 | 67.5% |
ScaleGrid PostgreSQL averages 74.5% higher throughput performance over DigitalOcean Managed Databases for PostgreSQL.
PostgreSQL DigitalOcean Latency Averages (ms) | ScaleGrid | DigitalOcean | ScaleGrid Improvement |
---|---|---|---|
Read-Intensive | 54.1 | 87.6 | -38.2% |
Balanced Workload | 22.5 | 43.7 | -48.5% |
Write-Intensive | 39.3 | 65.8 | -40.3% |
ScaleGrid PostgreSQL averages 42.3% lower latency performance over DigitalOcean Managed Databases for PostgreSQL.
How does ScaleGrid achieve such higher performance for PostgreSQL compared to DigitalOcean’s PostgreSQL service using the exact same deployment configurations? ScaleGrid for PostgreSQL is architectured to leverage-high performance SSD disks on DigitalOcean, and is finely tuned and optimized to achieve the best performance on DigitalOcean infrastructure.
PostgreSQL Benchmark Setup
Here is the configuration we used for the ScaleGrid and DigitalOcean benchmark performance tests highlighted above:
Configuration | Details |
---|---|
Benchmark Tool | PgBench |
PostgreSQL Version | 11 |
Scaling Factor | 10,000 |
Query Mode | Simple |
Number of Clients | 180 |
Number of Threads | 10 |
Duration | 1,800 seconds |
synchronous_commit | off |
In order to help you determine which provider is best for you, we compared PostgreSQL performance on DigitalOcean across all three common workload types:
Write-Intensive Workload
A write-intensive workload is one that is primarily dominated by write operations, and has more data written to the disk through queries like UPDATE and INSERT. We used 20% reads and 80% writes in this comparison, using standard TPC-B type transactions where each transaction consists of 3 updates, 1 insert and 1 select operation.
Balanced Workload
A balanced workload is one that has an equally balanced number of read operations and write operations. We used 50% reads and 50% writes in this comparison. A single transaction consisted of 1 select and 1 update operation.
Read-Intensive Workload
A read-intensive workload is one that is primarily dominated by read operations sent to the disk, and typically has more query types like SELECT. We used 80% reads and 20% writes in this comparison. A single transaction consisted of 4 select and 1 update operation.
PostgreSQL DigitalOcean Pricing
One of the first aspects to consider before adopting any new service is its cost. Fortunately, when comparing ScaleGrid vs. DigitalOcean PostgreSQL, pricing is not a major consideration because both offer extremely affordable plans at the exact same price. Let’s take a look at the various configurations:
As you can see from the above chart, both ScaleGrid PostgreSQL and DigitalOcean PostgreSQL offer standalone (1 data-bearing node), primary-standby (2 data-bearing nodes) and primary-standby-standby (3 data-bearing node) configurations.
DigitalOcean Managed Database pricing is the same as ScaleGrid’s DBaaS pricing across all PostgreSQL plans, as well as their MySQL and Redis plans, at just $15/GB for their standalone plans. ScaleGrid does offer some advanced configurations, such as standby nodes for their Nano plan, a standalone configuration for their 64GB X2XLarge plan, and an X4XLarge plan with 96GB for even larger-scale deployments.
While ScaleGrid and DigitalOcean charge the same amount by RAM, ScaleGrid offers, on average, over 30% more storage for the same price. Additionally, ScaleGrid supports DigitalOcean hosting for MongoDB® database, and is the only DBaaS to support this database cloud deployment.
PostgreSQL DigitalOcean Features
So, now that we’ve outlined performance and pricing, are there any other major considerations when deciding between ScaleGrid and DigitalOcean? Let’s take a look at some key features to wrap up this comparison:
ScaleGrid PostgreSQL | DigitalOcean PostgreSQL | |
---|---|---|
Supported PostgreSQL Versions | 9.6x, 10.x, 11.x, 12.x | 10.x, 11.x |
PostgreSQL Superuser Access | Yes | No |
Unlimited PostgreSQL Extensions | Yes | No |
Replication Strategies | Synchronous & asynchronous | Asynchronous |
Multi-Region Replication | Yes | Only for read replicas |
PostgreSQL Configuration Management & Tuning | Yes | No |
High Availability | Yes | Yes |
Continuous Backup | Coming soon | Yes |
For the sake of brevity, this is a summarized list. To see the full feature comparison, check out our ScaleGrid vs. DigitalOcean PostgreSQL page.
Top comments (0)