{"id":18470,"date":"2022-08-17T08:00:58","date_gmt":"2022-08-17T06:00:58","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=18470"},"modified":"2024-09-10T15:54:40","modified_gmt":"2024-09-10T13:54:40","slug":"mysql-server-on-microsoft-azure-2nd-part-performance-tests","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/","title":{"rendered":"MySQL Server on Microsoft Azure 2nd part (Performance tests)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"293\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-1024x293.png\" alt=\"\" class=\"wp-image-18471\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-1024x293.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-300x86.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-768x220.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2.png 1345w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Azure Database for MySQL<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>This second blog follows the first blog about <a href=\"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-1st-part-deployment\" target=\"_blank\" rel=\"noreferrer noopener\">deploying MySQL Server on Microsoft Azure<\/a>. In the first blog, we saw how easy it is to deploy a MySQL server in minutes on the Azure cloud and we connected on it through the MySQL Shell client.<\/p>\n\n\n\n<p><br>This second blog is more focused on the performance of MySQL in the Azure Cloud. Although I didn&#8217;t do any tuning of MySQL parameters, we will see the influence of MySQL Server localization on the latency as well as changes in parameters such as CPU, memory or IOPS on performances using the SysBench tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SysBench stress test<\/h2>\n\n\n\n<p>Of course there are many tools available to do stress tests. On my side, I decided to use SysBench simply because I know this wonderful free tool and because it is widely deployed. Rather than making a description of SysBench, I simply take a part of its description available on sourceforge that we can find below: <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><em>sysbench is a scriptable multi-threaded benchmark tool based on LuaJIT. It is most frequently used for database benchmarks, but can also be used to create arbitrarily complex workloads that do not involve a database server <\/em>&#8211; <a href=\"https:\/\/sourceforge.net\/projects\/sysbench.mirror\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/sourceforge.net\/projects\/sysbench.mirror\/<\/a>, 14.08.2022<\/p><\/blockquote>\n\n\n\n<p>Firstly I installed SysBench on my local Ubuntu client (osboxes). After the installation of SysBench but before starting the stress test, we first have to prepare the tables containing the records where the queries will be performed. In the following tests I created 10 tables with 1&#8217;000&#8217;000 rows in sysbench database (previously created). <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>osboxes@osboxes:\/usr\/bin$ sysbench --db-driver=mysql table-size=1000000 --mysql-host=albatroz.mysql.database.azure.com --mysql-port=3306 --mysql-db=sysbench --mysql-user=grs --tables=10 --mysql-password=MyPassword --test=\/usr\/share\/sysbench\/oltp_read_write.lua prepare<\/code><\/pre>\n\n\n\n<p>Once the tables populated, we can run the tests. For the tests, I decided to use oltp_read_write.lua which has a default ratio of read:write 95%:5%.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sysbench --db-driver=mysql  --num-threads=8 --mysql-user=grs --mysql-password=MyPassword --mysql-db=sysbench --events=0 --time=100  --test=\/usr\/share\/sysbench\/oltp_read_write.lua --mysql-host=albatroz.mysql.database.azure.com --mysql-port=3306 --tables=10 --db-ps-mode=disable --table-size=1000000 --report-interval=10 run<\/code><\/pre>\n\n\n\n<p> I varied the number of threads (num-threads parameter) from 8 to 256, limited the time to 100 seconds and changed two kinds of parameters through the Azure interface during my tests: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The Server location (East US, vs West Switzerland)<\/li><li>The Compute and Storage (Compute Tier and IOPS)<\/li><\/ul>\n\n\n\n<p>It&#8217;s important to note that my Client is  also located in Western Switzerland to understand the impact of location. You can find below the four configurations I did: <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Server located in <strong><mark class=\"has-inline-color has-vivid-cyan-blue-color\">US<\/mark><\/strong>, with minimal compute and storage meaning <mark class=\"has-inline-color has-vivid-purple-color\"><strong>1vCore 2Gib Memory and 360 IOPS<\/strong><\/mark><\/li><li>Server located in <strong><mark class=\"has-inline-color has-vivid-cyan-blue-color\">US<\/mark><\/strong>, with general purpose configuration meaning <mark class=\"has-inline-color has-vivid-green-cyan-color\"><strong>2vCores, 8Gib Memory and  3200 IOPS<\/strong><\/mark><\/li><li>Server located in <mark class=\"has-inline-color has-luminous-vivid-orange-color\"><strong>West Switzerland<\/strong>,<\/mark> with minimal compute and storage meaning <mark class=\"has-inline-color has-vivid-purple-color\"><strong>1vCore 2Gib Memory and 360 IOPS<\/strong><\/mark><\/li><li>Server located in <mark class=\"has-inline-color has-luminous-vivid-orange-color\"><strong>West Switzerland<\/strong><\/mark>, with general purpose configuration meaning <mark class=\"has-inline-color has-vivid-green-cyan-color\"><strong>2vCores, 8Gib Memory and  3200 IOPS<\/strong><\/mark><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Server details<\/h2>\n\n\n\n<p>As it&#8217;s not possible to change the location of a server afterwards, I created two MySQL servers in same version (version 8.0.28). One located in East US and the other located in West Switzerland. Note that we have two locations in Switzerland (North Switzerland and West Switzerland). As explained above, in order to make comparisons, I provided the same set of resources for tests 1 and 3 and test 2 and 4. Also as specified before, my client is located in Switzerland.<\/p>\n\n\n\n<p>The basic configuration looks like the one below: <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"632\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-009-1-1024x632.png\" alt=\"\" class=\"wp-image-18474\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-009-1-1024x632.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-009-1-300x185.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-009-1-768x474.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-009-1.png 1292w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Basic configuration<\/figcaption><\/figure>\n<\/div>\n\n\n<p>It is worth mentioning that to upgrade the server&#8217;s capacity (from Burstable to General Purpose with more IOPS), it only takes about ten minutes maximum. Meaning that when we end with the tests and we want to go to production, we only need few minutes to upgrade the server properties. We can find the description of the upgraded server below as well as the monthly price of this upgraded server. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"648\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-010-1024x648.png\" alt=\"\" class=\"wp-image-18473\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-010-1024x648.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-010-300x190.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-010-768x486.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-010.png 1262w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>General Purpose configuration<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Let&#8217;s run the tests<\/h2>\n\n\n\n<p>I executed the same tests with only a variation in the number of thread (from 8 to 256) on each four configurations. We can find an extract of the execution as well as the output below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>osboxes@osboxes:\/usr\/bin$ sysbench --db-driver=mysql  --num-threads=8 --mysql-user=grs --mysql-password=MyPassword --mysql-db=sysbench --events=0 --time=100  --test=\/usr\/share\/sysbench\/oltp_read_write.lua --mysql-host=albatroz.mysql.database.azure.com --mysql-port=3306 --tables=10 --db-ps-mode=disable --table-size=1000000 --report-interval=10 run\nWARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.\nWARNING: --num-threads is deprecated, use --threads instead\nsysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)\n\nRunning the test with following options:\nNumber of threads: 8\nReport intermediate results every 10 second(s)\nInitializing random number generator from current time\n\n\nInitializing worker threads...\n\nThreads started!\n\n&#091; 10s ] thds: 8 tps: 3.20 qps: 77.58 (r\/w\/o: 55.98\/4.40\/17.20) lat (ms,95%): 2082.91 err\/s: 0.00 reconn\/s: 0.00\n&#091; 20s ] thds: 8 tps: 4.00 qps: 72.91 (r\/w\/o: 50.51\/5.00\/17.40) lat (ms,95%): 2585.31 err\/s: 0.00 reconn\/s: 0.00\n&#091; 30s ] thds: 8 tps: 4.00 qps: 77.80 (r\/w\/o: 53.80\/5.30\/18.70) lat (ms,95%): 2120.76 err\/s: 0.00 reconn\/s: 0.00\n&#091; 40s ] thds: 8 tps: 3.20 qps: 72.80 (r\/w\/o: 52.50\/4.50\/15.80) lat (ms,95%): 2632.28 err\/s: 0.00 reconn\/s: 0.00\n&#091; 50s ] thds: 8 tps: 4.00 qps: 78.40 (r\/w\/o: 55.40\/5.10\/17.90) lat (ms,95%): 2082.91 err\/s: 0.00 reconn\/s: 0.00\n&#091; 60s ] thds: 8 tps: 4.00 qps: 73.60 (r\/w\/o: 49.70\/5.40\/18.50) lat (ms,95%): 2632.28 err\/s: 0.00 reconn\/s: 0.00\n&#091; 70s ] thds: 8 tps: 4.00 qps: 77.60 (r\/w\/o: 53.60\/5.00\/19.00) lat (ms,95%): 2082.91 err\/s: 0.00 reconn\/s: 0.00\n&#091; 80s ] thds: 8 tps: 3.20 qps: 73.60 (r\/w\/o: 54.10\/4.70\/14.80) lat (ms,95%): 2405.65 err\/s: 0.00 reconn\/s: 0.00\n&#091; 90s ] thds: 8 tps: 4.00 qps: 77.60 (r\/w\/o: 53.90\/4.80\/18.90) lat (ms,95%): 2082.91 err\/s: 0.00 reconn\/s: 0.00\n&#091; 100s ] thds: 8 tps: 4.00 qps: 73.60 (r\/w\/o: 49.60\/4.80\/19.20) lat (ms,95%): 2493.86 err\/s: 0.00 reconn\/s: 0.00\nSQL statistics:\n    queries performed:\n        read:                            5376\n        write:                           501\n        other:                           1803\n        total:                           7680\n    transactions:                        384    (3.78 per sec.)\n    queries:                             7680   (75.60 per sec.)\n    ignored errors:                      0      (0.00 per sec.)\n    reconnects:                          0      (0.00 per sec.)\n\nGeneral statistics:\n    total time:                          101.5914s\n    total number of events:              384\n\nLatency (ms):\n         min:                                 2000.71\n         avg:                                 2115.55\n         max:                                 2644.11\n         95th percentile:                     2585.31\n         sum:                               812371.47\n\nThreads fairness:\n    events (avg\/stddev):           48.0000\/0.00\n    execution time (avg\/stddev):   101.5464\/0.07<\/code><\/pre>\n\n\n\n<p>We can see in this output, that I asked to sysbench to provide me with a feedback every 10 seconds. We can also observe that the ratio between the queries and transaction is respected (95%:5%), finally it can noted that the latency is important in our case (Server in US and client in Switzerland). The average latency in the above example is 2&#8217;115.55ms. If we are interested in the latency distribution we can use the option &#8211;histogram. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Tests summary<\/h2>\n\n\n\n<p>We can find below the summary of the tests I did with the described configurations. <\/p>\n\n\n\n<table cellspacing=\"2\" border=\"1\"><tbody>\n<tr>\n\t<td align=\"right\"><\/td><td colspan=\"4\" align=\"center\">East US<\/td><td colspan=\"4\" align=\"center\">West Switzerland<\/td>\n<\/tr>\n<tr>\n\t<td align=\"right\"><\/td>\n\t<td colspan=\"2\" align=\"center\">1.Minimal configuration<\/td>\n\t<td colspan=\"2\" align=\"center\">2. General purpose<\/td>\n\t<td colspan=\"2\" align=\"center\">3.Minimal configuration<\/td><td colspan=\"2\" align=\"center\">4. General purpose<\/td>\n<\/tr>\n<tr>\n\t<td align=\"right\">Number of Threads<\/td>\n\t<td align=\"right\">trans.\/sec<\/td>\n\t<td align=\"right\">queries\/sec<\/td>\n\t<td align=\"right\">trans.\/sec<\/td>\n\t<td align=\"right\">queries\/sec<\/td>\n\t<td align=\"right\">trans.\/sec<\/td>\n\t<td align=\"right\">queries\/sec<\/td>\n\t<td align=\"right\">trans.\/sec<\/td>\n\t<td align=\"right\">queries\/sec<\/td>\n<\/tr>\n<tr>\n\t<td align=\"right\">8<\/td>\n\t<td align=\"right\">3,78<\/td>\n\t<td align=\"right\">75,6<\/td>\n\t<td align=\"right\">3,73<\/td>\n\t<td align=\"right\">74,63<\/td>\n\t<td align=\"right\">27,91<\/td>\n\t<td align=\"right\">559,82<\/td>\n\t<td align=\"right\">28,06<\/td>\n\t<td align=\"right\">561,13<\/td>\n<\/tr>\n<tr>\n\t<td align=\"right\">16<\/td>\n\t<td align=\"right\">7,95<\/td>\n\t<td align=\"right\">150,94<\/td>\n\t<td align=\"right\">7,46<\/td>\n\t<td align=\"right\">149,22<\/td>\n\t<td align=\"right\">54,13<\/td>\n\t<td align=\"right\">1083,58<\/td>\n\t<td align=\"right\">56,04<\/td>\n\t<td align=\"right\">1120,71<\/td>\n<\/tr>\n<tr>\n\t<td align=\"right\">32<\/td>\n\t<td align=\"right\">15,14<\/td>\n\t<td align=\"right\">303,02<\/td>\n\t<td align=\"right\">15,52<\/td>\n\t<td align=\"right\">310,61<\/td>\n\t<td align=\"right\">102,33<\/td>\n\t<td align=\"right\">2047,31<\/td>\n\t<td align=\"right\">105,18<\/td>\n\t<td align=\"right\">2103,62<\/td>\n<\/tr><tr>\n\t<td align=\"right\">64<\/td>\n\t<td align=\"right\">29,1<\/td>\n\t<td align=\"right\">588,85<\/td>\n\t<td align=\"right\">30,74<\/td>\n\t<td align=\"right\">614,91<\/td>\n\t<td align=\"right\">178,78<\/td>\n\t<td align=\"right\">3576<\/td>\n\t<td align=\"right\">167,92<\/td>\n\t<td align=\"right\">3358,82<\/td>\n<\/tr>\n<tr>\n\t<td align=\"right\">128<\/td>\n\t<td align=\"right\">58,87<\/td>\n\t<td align=\"right\">1179,82<\/td>\n\t<td align=\"right\">61,19<\/td>\n\t<td align=\"right\">1225,15<\/td>\n\t<td colspan=\"2\" align=\"right\">too many conn.<\/td>\n\t<td align=\"right\">191,83<\/td>\n\t<td align=\"right\">3837,11<\/td>\n<\/tr>\n<tr>\n\t<td align=\"right\">192<\/td>\n\t<td colspan=\"2\" align=\"right\">too many conn.<\/td>\n\t<td align=\"right\">86,08<\/td>\n\t<td align=\"right\">1722,69<\/td>\n\t<td colspan=\"2\" align=\"right\">too many conn.<\/td>\n\t<td align=\"right\">176,63<\/td>\n\t<td align=\"right\">3533,02<\/td>\n<\/tr>\n\t<tr><td align=\"right\">256<\/td>\n\t<td colspan=\"2\" align=\"right\">too many conn.<\/td>\n\t<td align=\"right\">107,73<\/td>\n\t<td align=\"right\">2158,16<\/td>\n\t<td colspan=\"2\" align=\"right\">too many conn.<\/td>\n\t<td align=\"right\">161,66<\/td>\n\t<td align=\"right\">3233,95<\/td>\n<\/tr><\/tbody><\/table>\n\n\n\n<p><\/p>\n\n\n\n<p>The first thing we can see after having a look on the above table is that whereas we faced a &#8220;too many connections&#8221; errors with minimal configurations, the tests worked properly with the General purpose configuration. <\/p>\n\n\n\n<p>The second thing that we can observe is that the tests performed better with the server located in West Switzerland. One of the reasons is most probably linked with the latency. Whereas we had an average of 2&#8217;100ms of latency for server located in East US, we have an average of 350ms of latency for server located in West Switzerland. <\/p>\n\n\n\n<p>Finally in our configuration, the increase of compute and storage doesn&#8217;t show any improvement in terms of transaction per second or queries per second. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Latency between the application and the MySQL Server<\/h3>\n\n\n\n<p>The latency is an important parameter to take into consideration. As explained on Microsoft webpage named &#8220;Best practices for optimal performance of your Azure Database for MySQL server&#8221; to improve the performance of an application, we have to take into consideration the proximity between the MySQL Server and the application. <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>To improve the performance and reliability of an application in a cost optimized deployment, it&#8217;s highly recommended that the web application service and the Azure Database for MySQL resource reside in the same region and availability zone. &#8211; <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/mysql\/single-server\/concept-performance-best-practices\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft<\/a>,  16.08.2022<\/p><\/blockquote>\n\n\n\n<p>This page also gives some tips in order to optimize your MySQL performances on Azure. To check the latency, you do not need to use SysBench, a simple query such as the one executed in the below examples presents the latency difference between the execution on a localhost, an Azure server located in Switzerland and an Azure server located in US. <\/p>\n\n\n\n<p><strong>Latency on a Localhost<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql&gt; select 1;\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n1 row in set (<strong>0.00 sec<\/strong>)\n<\/code><\/pre>\n\n\n\n<p><strong>Latency on an<\/strong> <strong>Azure Server located in West Switzerland<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> MySQL  albatrozswitzerland.mysql.database.azure.com:3306 ssl SQL &gt; select 1;\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n1 row in set (<strong>0.0436 sec<\/strong>)<\/code><\/pre>\n\n\n\n<p><strong>Latency on an<\/strong> <strong>Azure Server located in East US<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> MySQL  albatroz.mysql.database.azure.com:3306 ssl SQL &gt; select 1;\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n1 row in set (<strong>0.1690 sec<\/strong>)<\/code><\/pre>\n\n\n\n<p>Considering only the latency, one could think that the application must be hosted on an Azure server in Switzerland (at least in my case). Unfortunately we will discover that not all services of the Microsoft Azure Cloud are available in Switzerland. For instance if we want to deploy an Ubuntu Server, we will see that only the following location are available: <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"384\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-012.png\" alt=\"\" class=\"wp-image-18505\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-012.png 486w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-012-300x237.png 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><figcaption>Ubuntu Server possible locations<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Performance monitoring<\/h2>\n\n\n\n<p>Microsoft Azure provides us with an interface showing the following default graphs (cf screenshot below: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>CPU and Memory<\/li><li>IO Percent<\/li><li>DB Connections<\/li><li>Queries<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"294\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-011-1024x294.png\" alt=\"\" class=\"wp-image-18476\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-011-1024x294.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-011-300x86.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-011-768x220.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-011-1536x441.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-011.png 1798w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>default performance graphs<\/figcaption><\/figure>\n\n\n\n<p>But you can add other information regarding storage, Host network in\/out, replication lag, aborted connection, aso&#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>This short blog regarding the performance of MySQL in the Azure Cloud provides the following conclusions: <\/p>\n\n\n\n<p>The ability to upgrade a MySQL server by adding CPU, disk and memory capacity in a few minutes is really interesting. For instance when you want to switch your test project to production, you simply need to change the servers properties and 10 minutes later, your server is adapted. Additionally, we can always reduce the CPU &amp; Memory capacity as well as the IOPS, only the storage cannot be reduced. <\/p>\n\n\n\n<p>At first glance, it also seems that it is very important to use a MySQL server close to the client for performance reasons (in order to avoid latency issues). Unfortunately depending on the application and business requirements it could be difficult to have the MySQL Server and the Application Server in the same country. <\/p>\n\n\n\n<p>Finally adding CPU, memory and increasing the number of IOPS did not show any improvement in the number of transactions or queries per second in this specific configuration (of course it&#8217;s strongly depending on the use case). However, this does not mean that by taking the time to configure the MySQL server correctly, one could not benefit from these additional capacities. Regarding the tuning of MySQL variables, it&#8217;s interesting to see that some variables are updated automatically such as the innodb_buffer_pool_size when we change server resources. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This second blog follows the first blog about deploying MySQL Server on Microsoft Azure. In the first blog, we saw how easy it is to deploy a MySQL server in minutes on the Azure cloud and we connected on it through the MySQL Shell client. This second blog is more focused on the performance [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3271,955,1316],"tags":[1338,2664],"type_dbi":[],"class_list":["post-18470","post","type-post","status-publish","format-standard","hentry","category-azure","category-cloud","category-mysql","tag-azure","tag-mysql-3"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>MySQL Server on Microsoft Azure 2nd part (Performance tests) - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL Server on Microsoft Azure 2nd part (Performance tests)\" \/>\n<meta property=\"og:description\" content=\"Introduction This second blog follows the first blog about deploying MySQL Server on Microsoft Azure. In the first blog, we saw how easy it is to deploy a MySQL server in minutes on the Azure cloud and we connected on it through the MySQL Shell client. This second blog is more focused on the performance [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-17T06:00:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-10T13:54:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-1024x293.png\" \/>\n<meta name=\"author\" content=\"Gr\u00e9gory Steulet\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gr\u00e9gory Steulet\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/\"},\"author\":{\"name\":\"Gr\u00e9gory Steulet\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/7609faada8e4d63e04a28ae29e227098\"},\"headline\":\"MySQL Server on Microsoft Azure 2nd part (Performance tests)\",\"datePublished\":\"2022-08-17T06:00:58+00:00\",\"dateModified\":\"2024-09-10T13:54:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/\"},\"wordCount\":1411,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/08\\\/MySQLAzure-001-2-1024x293.png\",\"keywords\":[\"Azure\",\"MySQL\"],\"articleSection\":[\"Azure\",\"Cloud\",\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/\",\"name\":\"MySQL Server on Microsoft Azure 2nd part (Performance tests) - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/08\\\/MySQLAzure-001-2-1024x293.png\",\"datePublished\":\"2022-08-17T06:00:58+00:00\",\"dateModified\":\"2024-09-10T13:54:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/7609faada8e4d63e04a28ae29e227098\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/08\\\/MySQLAzure-001-2.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/08\\\/MySQLAzure-001-2.png\",\"width\":1345,\"height\":385},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Server on Microsoft Azure 2nd part (Performance tests)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/7609faada8e4d63e04a28ae29e227098\",\"name\":\"Gr\u00e9gory Steulet\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1531483285469fe17ea7a769ce5d8a8a01847185e4245d9c4d22c575c7c6d3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1531483285469fe17ea7a769ce5d8a8a01847185e4245d9c4d22c575c7c6d3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1531483285469fe17ea7a769ce5d8a8a01847185e4245d9c4d22c575c7c6d3e?s=96&d=mm&r=g\",\"caption\":\"Gr\u00e9gory Steulet\"},\"description\":\"Gr\u00e9gory Steulet has more than ten years of experience in database and infrastructure management, engineering, and optimization. He is specialized in Oracle technologies and high availability solutions (Oracle DataGuard, Data Replication Block Device). His expertise also includes Avaloq banking applications, as well as the open source field (MySQL, Unix\\\/Linux, etc.). Gr\u00e9gory Steulet is \\\"Oracle Certified Professional 10g\\\", \\\"MySQL Cluster 5.1 Certified\\\", and \\\"Avaloq Certified Professional 2.6\\\". Prior to joining dbi services, Gr\u00e9gory Steulet was Senior Consultant at Trivadis in Lausanne. He also worked as IT Administrator at Box Telecom in Miami Beach, Florida (USA). Gr\u00e9gory Steulet has an Executive MBA from the International Institute of Management in Technology, Fribourg (CH). He also holds a Bachelor's Degree in Business Administration and Computer Science from the University of Applied Sciences Western Switzerland. His branch-related experience covers Telecommunications, Financial Services \\\/ Banking, Logistics, Pharma etc.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/gregory-steulet\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"MySQL Server on Microsoft Azure 2nd part (Performance tests) - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/","og_locale":"en_US","og_type":"article","og_title":"MySQL Server on Microsoft Azure 2nd part (Performance tests)","og_description":"Introduction This second blog follows the first blog about deploying MySQL Server on Microsoft Azure. In the first blog, we saw how easy it is to deploy a MySQL server in minutes on the Azure cloud and we connected on it through the MySQL Shell client. This second blog is more focused on the performance [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/","og_site_name":"dbi Blog","article_published_time":"2022-08-17T06:00:58+00:00","article_modified_time":"2024-09-10T13:54:40+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-1024x293.png","type":"","width":"","height":""}],"author":"Gr\u00e9gory Steulet","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Gr\u00e9gory Steulet","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/"},"author":{"name":"Gr\u00e9gory Steulet","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/7609faada8e4d63e04a28ae29e227098"},"headline":"MySQL Server on Microsoft Azure 2nd part (Performance tests)","datePublished":"2022-08-17T06:00:58+00:00","dateModified":"2024-09-10T13:54:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/"},"wordCount":1411,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-1024x293.png","keywords":["Azure","MySQL"],"articleSection":["Azure","Cloud","MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/","url":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/","name":"MySQL Server on Microsoft Azure 2nd part (Performance tests) - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2-1024x293.png","datePublished":"2022-08-17T06:00:58+00:00","dateModified":"2024-09-10T13:54:40+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/7609faada8e4d63e04a28ae29e227098"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/08\/MySQLAzure-001-2.png","width":1345,"height":385},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/mysql-server-on-microsoft-azure-2nd-part-performance-tests\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"MySQL Server on Microsoft Azure 2nd part (Performance tests)"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/7609faada8e4d63e04a28ae29e227098","name":"Gr\u00e9gory Steulet","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e1531483285469fe17ea7a769ce5d8a8a01847185e4245d9c4d22c575c7c6d3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e1531483285469fe17ea7a769ce5d8a8a01847185e4245d9c4d22c575c7c6d3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e1531483285469fe17ea7a769ce5d8a8a01847185e4245d9c4d22c575c7c6d3e?s=96&d=mm&r=g","caption":"Gr\u00e9gory Steulet"},"description":"Gr\u00e9gory Steulet has more than ten years of experience in database and infrastructure management, engineering, and optimization. He is specialized in Oracle technologies and high availability solutions (Oracle DataGuard, Data Replication Block Device). His expertise also includes Avaloq banking applications, as well as the open source field (MySQL, Unix\/Linux, etc.). Gr\u00e9gory Steulet is \"Oracle Certified Professional 10g\", \"MySQL Cluster 5.1 Certified\", and \"Avaloq Certified Professional 2.6\". Prior to joining dbi services, Gr\u00e9gory Steulet was Senior Consultant at Trivadis in Lausanne. He also worked as IT Administrator at Box Telecom in Miami Beach, Florida (USA). Gr\u00e9gory Steulet has an Executive MBA from the International Institute of Management in Technology, Fribourg (CH). He also holds a Bachelor's Degree in Business Administration and Computer Science from the University of Applied Sciences Western Switzerland. His branch-related experience covers Telecommunications, Financial Services \/ Banking, Logistics, Pharma etc.","url":"https:\/\/www.dbi-services.com\/blog\/author\/gregory-steulet\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/18470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=18470"}],"version-history":[{"count":16,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/18470\/revisions"}],"predecessor-version":[{"id":18531,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/18470\/revisions\/18531"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=18470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=18470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=18470"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=18470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}