Determine the MySQL Database on Azure service tier required for your workload
This article explains the concept of Compute Units in MySQL Database on Azure, along with how to determine the service tier based on the Compute Units required for your workload. You can determine the MySQL Database on Azure service tier required for your services based on a simple conversion method and the corresponding relationship between service tiers and Compute Units explained in the article.
What are Compute Units?
Compute Units are a measure of available CPU processing throughput for an individual MySQL Database on Azure server. A Compute Unit is a combined measure of CPU resources and memory resources. Generally speaking, 50 Compute Units are equal to half a CPU core, 100 Compute Units are equal to 1 CPU core, and 1,300 Compute Units are equal to 13 CPU cores guaranteeing the server’s available processing throughput.
Going up one performance level doubles the number of Compute Units. This is equivalent to doubling the size of the individual MySQL Database on Azure available resource set.
For example, 1,300 Compute Units provide high-performance with more than 13 times the CPU throughput and memory of 100 Compute Units.
You can change the service tier at any time with virtually no app downtime. For many businesses and applications, the ability to create two or more databases in an individual MySQL Database on Azure server and increase or reduce performance attributes as needed provides vital management flexibility.
Note
As MP service layers use different storage schema to MS service layers, MySQL Database on Azure does not currently support directly downgrading from MP to MS. If you are certain that you need to perform this type of downgrade operation, it can be accomplished by first creating a subordinate instance and then promoting it to a master instance.
How do I determine the required service tier based on the number of Compute Units?
If you want to migrate an existing MySQL or MySQL instance running on a virtual machine, you can determine the number of Compute Units by estimating the number of CPU cores for the processing throughput required by your workload. For example, if the local or virtual machine is using four CPU cores (excluding CPU hyper-threading), then you can start by choosing MS6 and running a stress test (450 Compute Units).
The following table gives some examples of the simple relationship between the service tier and the number of Compute Units and maximum connections:
MS1 | MS2 | MS3 | MS4 | MS5 | MS6 | MP1 | MP2 | |
Compute Units | 10 | 20 | 60 | 200 | 300 | 450 | 680 | 1300 |
Maximum number of concurrent connections | 100 | 200 | 500 | 1000 | 1500 | 2000 | 4000 | 6000 |
What happens if I reach the maximum number of Compute Units and/or connections?
MySQL Database on Azure automatically calibrates and controls performance to provide the required resources to run the database workload, within the maximum scope permitted by the selected service tier. If your workload reaches either the Compute Unit limit or the maximum connections limit, MySQL Database on Azure will continue to work up to the permitted maximum performance level. However, users might find that delays to queries continually increase. These limits will not cause any errors, as they just slow down response speeds. In more serious situations, this can cause queries to become so slow that they time out.
Next steps
To find out how to create your first MySQL server on Azure in just three minutes, see the Quick-start guide to MySQL Database on Azure.