MySQL on Azure Performance Benchmark – ScaleGrid vs. Azure Database
Tuesday, September 1, 2020 at 8:02AM
Kristi Anderson in Azure, Azure Database, Database, Database Infrastructure, Database as a Service, MySQL, MySQL Azure, MySQL Database, MySQL Performance, MySQL on Azure, Performance Benchmark, Performance Test, ScaleGrid, benchmark, database, databases, mysql

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

ScaleGrid Blog - At a glance overview - 1st point

Read-Intensive Workloads

During Read-Intensive Workloads, ScaleGrid manages to achieve up to 3 times higher throughput and averages 66% better latency compared to Azure Database. Read now
ScaleGrid Blog - At a glance overview - 2nd point

Balanced Workloads

With an average of 150% better throughput, and less than one third of the latency, ScaleGrid outperforms Azure Database for Balanced Workloads. Read now
ScaleGrid Blog - At a glance overview - 3rd point

Write-Intensive Workloads

Scalegrid achieves up to 4 times higher throughput and averages 64% lower latency across all number of threads compared to Azure Database for MySQL. Read now

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:

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:

Throughput

MySQL - ScaleGrid vs Azure Databases – Read-Intensive Throughput Performance Graph

Threads ScaleGrid Azure ScaleGrid Improvement
25 5,299 1,689 214%
50 6,092 2,302 165%
100 8,429 2,877 193%
150 9,011 2,870 214%
175 7,025 2,805 151%
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.

Latency

MySQL - ScaleGrid vs Azure Databases – Read-Intensive Latency Performance Graph

Threads ScaleGrid Azure ScaleGrid Improvement
25 258 451 -43%
50 101 670 -85%
100 148 978 -85%
150 309 1562 -80%
175 1,089 1,678 -35%
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.

Throughput

MySQL - ScaleGrid vs Azure Databases – Balanced Workload Throughput Performance Graph

Threads ScaleGrid Azure ScaleGrid Improvement
25 3,806 1,748 118%
50 5,834 2,437 139%
100 6,365 2,712 135%
150 5,724 2,775 106%
175 6,206 1,767 251%
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.

 

Latency

MySQL - ScaleGrid vs Azure Databases – Balanced Workload Latency Performance Graph

Threads ScaleGrid Azure ScaleGrid Improvement
25 76 390 -81%
50 103 612 -83%
100 240 943 -75%
150 560 1,590 -65%
175 560 2,199 -75%
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.

Throughput

MySQL - ScaleGrid vs Azure Databases – Write-Intensive Throughput Performance Graph

Threads ScaleGrid Azure ScaleGrid Improvement
25 3,327 826 303%
50 5,003 1,154 334%
100 5,180 1,476 251%
150 4,310 1,651 161%
175 4,071 1,643 148%
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.

 

Latency

MySQL - ScaleGrid vs Azure Databases – Write-Intensive Latency Performance Graph

Threads ScaleGrid Azure ScaleGrid Improvement
25 76 277 -73%
50 101 383 -74%
100 298 996 -70%
150 760 1,740 -56%
175 1,089 2,009 -46%
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.

Benchmark configurations

Let’s take a look at the configurations we used in the performance benchmark:

Configuration Comparison

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

Sysbench Configuration

Configuration Details
Tool Sysbench version 1.0.20
Host Standard_Ds2_v2 2 cores (2 vcpus, 7GB memory) on East US region
# Tables 100
# Rows per table 2,000,000
Random numbers distribution Special

MySQL Server Configuration

Configuration Azure Scalegrid (Dedicated) Azure DB for MySQL
SQL version 5.7.25 5.7.27
innodb_buffer_pool_size 4G 7.5G
innodb_log_file_size 1G 268M
innodb_io_capacity 500 500
innodb_io_capacity_max 1000 1000

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.

Article originally appeared on (http://highscalability.com/).
See website for complete article licensing information.