Microsoft Azure is one of the most popular cloud providers in the world, and a natural fit for database hosting on applications leveraging Microsoft across their infrastructure. MySQL is the number one open source database that’s commonly hosted through Azure instances. While Microsoft offers their own Azure Database product, there are other alternatives available that may be able to help you improve your MySQL performance. In this blog post, we compare Azure Database for MySQL vs. ScaleGrid MySQL on Azure so you can see which provider offers the best throughput and latency performance. We measure latency in ms 95th percentile latency.
At a glance – TLDR
Just getting started? Check out The Best Way to Host MySQL on Azure Cloud post to learn more about optimizing your cloud database deployment.
MySQL Azure Performance Benchmark
In this benchmark report, we compare MySQL hosting on Azure at ScaleGrid vs. Azure Database for MySQL across these three workload scenarios:
- Read-Intensive Workload: 80% reads and 20% writes
- Balanced Workload: 50% reads and 50% writes
- Write-Intensive Workload: 20% reads and 80% writes
We measure the MySQL throughput and latency performance, and measure throughput in terms of queries per second (QPS) and latency in terms of 95th percentile (ms). Check out our Benchmark Configuration section below the performance report to see how these tests were configured.
MySQL Read-Intensive Performance
MySQL read-intensive workloads are workloads that are typically dominated by read operations, such as SELECT. So, a read-intensive workload would be one that searches the database more often vs. writing to it. Percona has a great post on read-intensive vs. write-intensive workloads where you can learn more.
Let’s take a look at the throughput and latency performance of ScaleGrid MySQL vs. Azure Database for MySQL:
|As we can see from the above graph and performance table, ScaleGrid MySQL achieves up to 3x higher throughput compared to Azure Database for read-intensive workloads. While Azure Database for MySQL throughput is under 3,000 queries per second across all thread scenarios, ScaleGrid has over 5,000-9,000 queries per second across threads.|
|While Azure Database for MySQL latency rapidly increases as the number of threads grows, ScaleGrid MySQL steadily achieves low latency across all thread counts. On average, ScaleGrid for MySQL has 66% lower latency than Azure Database for MySQL for read-intensive workload scenarios.|
MySQL Balanced Workload Performance
Balanced workloads leverage roughly equal amounts of read operations and write operations.
|On average, ScaleGrid improved the MySQL throughput by 150% over Azure Database for MySQL for balanced workloads, and is over 2x better across all number of threads. Azure Database maxed out at around 2,775 queries per second at 150 threads, while ScaleGrid achieved 5,724 queries per second for the same number of threads.|
|We see another dramatic improvement in latency performance for balanced workloads, where ScaleGrid MySQL deployments are able to perform at less than one third the latency compared to Azure Database for MySQL.|
MySQL Write-Intensive Performance
While read operations are searching from the database, write operations are those that save to or modify the database, such as INSERT, UPDATE or DELETE queries. Write-intensive workloads are typically more expensive than read-intensive workloads as the operations consume more resources. Let’s compare ScaleGrid vs. Azure Database throughput and latency performance across MySQL write-intensive workloads.
|In our write-intensive scenario, we are able to see the largest performance improvement where ScaleGrid achieves up to 4x higher throughput compared to Azure Database. This is especially apparent in our low-thread scenarios, but even at 175 threads ScaleGrid still performs 2.5x better than Azure Database.|
|ScaleGrid outperformed Azure Database again with an average of 64% lower latency across all number of threads for write-intensive workloads.|
As we can see from the above reports, ScaleGrid helps you significantly increase your throughput and decrease your latency against Azure Database deployments for MySQL across read-intensive, write-intensive and balanced workloads scenarios. To learn more about how these two providers compare across features, check out the ScaleGrid vs. Azure Database MySQL page.
Let’s take a look at the configurations we used in the performance benchmark:
We designed the configuration using the most comparable plans offered between ScaleGrid and Azure Database. There are only minor differences and the costs are the same for the two providers:
|ScaleGrid MySQL on Azure||Azure Database for MySQL|
|Instance Type||Dedicated Large: Standard_Ds2_v2 2 cores||General Purpose: 2 cores|
|RAM||7GB||10GB (5GB Memory per vCore)|
|SSD||128GB, Premium SSD disk, 500 IOPS||167GB, up to 500 IOPS|
|Deployment Type||2+1 Quorum with Semisynchronous replication||+1 Read Replica Asynchronous replication|
|Region||East US||East US|
|Support||Included||Standard plan ($100)|
|Estimated Monthly Price||$400||$400|
|Tool||Sysbench version 1.0.20|
2 cores (2 vcpus, 7GB memory) on East US region
|# Rows per table||2,000,000|
|Random numbers distribution||Special|
MySQL Server Configuration
|Configuration||Azure Scalegrid (Dedicated)||Azure DB for MySQL|
Note that at ScaleGrid, you have advanced options to customize your MySQL configurations. This allows you to customize your deployment to your application needs and optimize for performance. Unfortunately, Azure Database does not allow for customization of some of the parameters, so you are stuck with the default configurations available through their platform.
For example, we were able to customize the InnoDB log file size to 1GB whereas for Azure Database, this cannot be modified and has a default value of 268M. Learn more about the limitations in Azure Database for MySQL.
There are many other advantages of using Scalegrid MySQL for Azure, check out the full comparison on our ScaleGrid vs. Azure Database – MySQL Hosting page.