You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mysql-azure/_index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ draft: true
5
5
cascade:
6
6
draft: true
7
7
8
-
minutes_to_complete: 40
8
+
minutes_to_complete: 30
9
9
10
-
who_is_this_for: This is an advanced topic that introduces MySQL deployment on Microsoft Azure Cobalt 100 (Arm-based) virtual machines. It is designed for developers migrating MySQL applications from x86_64 to Arm.
10
+
who_is_this_for: This is an introductory topic that introduces MySQL deployment on Microsoft Azure Cobalt 100 (Arm-based) virtual machines. It is designed for developers migrating MySQL applications from x86_64 to Arm.
11
11
12
12
learning_objectives:
13
13
- Provision an Azure Arm64 virtual machine using Azure console, with Ubuntu Pro 24.04 LTS as the base image.
14
14
- Deploy MySQL on the Ubuntu virtual machine.
15
-
- Perform MySQL baseline testing and benchmarking on both x86_64 and Arm64 virtual machines.
15
+
- Perform MySQL baseline testing and benchmarking on Arm64 virtual machines.
16
16
17
17
prerequisites:
18
18
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6)
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mysql-azure/baseline.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,29 @@ weight: 6
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Run a functional test of MySQL on Azure Cobalt 100
10
-
11
-
After installing MySQL on your Arm64 virtual machine, you can perform simple baseline testing to validate that MySQL runs correctly and produces the expected output.
9
+
After installing MySQL on your Azure Cobalt 100 Arm64 virtual machine, you should run a functional test to confirm that the database is operational and ready for use. Beyond just checking service status, validation ensures MySQL is processing queries correctly, users can authenticate, and the environment is correctly configured for cloud workloads.
12
10
13
11
### Start MySQL
14
12
15
-
Make sure MySQL is running:
13
+
Ensure MySQL is running and configured to start on boot:
16
14
17
15
```console
18
16
sudo systemctl start mysql
19
17
sudo systemctl enable mysql
20
18
```
21
19
### Connect to MySQL
22
20
21
+
Connect using the MySQL client:
22
+
23
23
```console
24
24
mysql -u admin -p
25
25
```
26
-
Opens the MySQL client and connects as the new user(admin), prompting you to enter the admin password.
26
+
This opens the MySQL client and connects as the new user(admin), prompting you to enter the admin password.
27
+
28
+
### Show and Use Database
27
29
28
-
### Show and use Database
30
+
Once you’ve connected successfully with your new user, the next step is to create and interact with a database. This verifies that your MySQL instance is not only accessible but also capable of storing and organizing data.
31
+
Run the following commands inside the MySQL shell:
29
32
30
33
```sql
31
34
CREATEDATABASEbaseline_test;
@@ -69,10 +72,13 @@ mysql> SELECT DATABASE();
69
72
+---------------+
70
73
1 row in set (0.00 sec)
71
74
```
72
-
You created a new database named **baseline_test**, verified its presence with `SHOW DATABASES`, and confirmed it is the active database using `SELECT DATABASE()`.
75
+
You created a new database named `baseline_test`, verified its presence with `SHOW DATABASES`, and confirmed it is the active database using `SELECT DATABASE()`.
73
76
74
77
### Create and show Table
75
78
79
+
After creating and selecting a database, the next step is to define a table, which represents how your data will be structured. In MySQL, tables are the core storage objects where data is inserted, queried, and updated.
80
+
Run the following inside the `baseline_test` database:
81
+
76
82
```sql
77
83
CREATETABLEtest_table (
78
84
id INT AUTO_INCREMENT PRIMARY KEY,
@@ -100,10 +106,13 @@ mysql> SHOW TABLES;
100
106
+-------------------------+
101
107
1 row in set (0.00 sec)
102
108
```
103
-
You successfully created the table **test_table** in the `baseline_test` database and verified its existence using `SHOW TABLES`.
109
+
You successfully created the table `test_table` in the `baseline_test` database and verified its existence using `SHOW TABLES`.
104
110
105
111
### Insert Sample Data
106
112
113
+
Once the table is created, you can populate it with sample rows. This validates that MySQL can handle write operations and that the underlying storage engine is working properly.
114
+
115
+
Run the following SQL command inside the baseline_test database:
107
116
```sql
108
117
INSERT INTO test_table (name, value)
109
118
VALUES
@@ -114,7 +123,7 @@ VALUES
114
123
-`INSERT INTO test_table (name, value)` - Specifies which table and columns to insert into.
115
124
-`VALUES` - Provides three rows of data.
116
125
117
-
After inserting, you can check the data with:
126
+
After inserting data into `test_table`, you can confirm the write operation succeeded by retrieving the rows with:
118
127
119
128
```sql
120
129
SELECT*FROM test_table;
@@ -135,6 +144,6 @@ mysql> SELECT * FROM test_table;
135
144
+----+---------+-------+
136
145
3 rows in set (0.00 sec)
137
146
```
147
+
This confirms that that rows were successfully inserted, the auto-increment primary key (id) is working correctly and the query engine can read back from disk/memory and return results instantly.
138
148
139
-
The functional test was successful — the **test_table** contains three rows (**Alice, Bob, and Charlie**) with their respective values, confirming MySQL is working
140
-
correctly.
149
+
The functional test was successful. The test_table contains the expected three rows (Alice, Bob, and Charlie) with their respective values. This confirms that MySQL is working correctly on your Cobalt 100 Arm-based VM, completing the installation and validation phase.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mysql-azure/benchmarking.md
+35-33Lines changed: 35 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,29 +6,34 @@ weight: 7
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Benchmark MySQL on Azure Cobalt 100 Arm-based instances and x86_64 instances
9
+
## Benchmark MySQL on Azure Cobalt 100 Arm-based instances
10
10
11
-
`mysqlslap` is the official MySQL benchmarking tool used to simulate multiple client connections and measure query performance. It helps evaluate **read/write throughput, query response times**, and overall MySQL server performance under different workloads, making it ideal for baseline testing and optimization.
11
+
To understand how MySQL performs on Azure Cobalt 100 (Arm64) VMs, you can use the built-in `mysqlslap` tool.
12
+
13
+
`mysqlslap` is the official MySQL benchmarking tool used to simulate multiple client connections and measure query performance. It helps evaluate read/write throughput, query response times, and overall MySQL server performance under different workloads, making it ideal for baseline testing and optimization.
12
14
13
15
## Steps for MySQL Benchmarking with mysqlslap
14
16
15
17
1. Connect to MySQL and Create a Database
16
18
17
-
To access the MySQL server, use the following command based on your `admin` user password:
19
+
Before running `mysqlslap`, you will create a dedicated test database so that benchmarking doesn’t interfere with your application data. This ensures clean test results and avoids accidental modifications to production schemas.
20
+
Connect to MySQL using the admin user:
18
21
19
22
```console
20
23
mysql -u admin -p
21
24
```
22
-
Once logged in, you can create a benchmark_db using SQL commands like:
25
+
Once logged in, create a benchmarking database:
23
26
24
27
```sql
25
28
CREATEDATABASEbenchmark_db;
26
29
USE benchmark_db;
27
30
```
28
31
29
-
3. Create a Table and Populate Data
32
+
2. Create a Table and Populate Data
33
+
34
+
With a dedicated `benchmark_db` created, the next step is to define a test table and populate it with data. This simulates a realistic workload so that `mysqlslap` can measure query performance against non-trivial datasets.
30
35
31
-
After logging into MySQL, you can create a table to store benchmark data. Here’s a simple example:
INSERT INTO benchmark_table (username,score) VALUES
44
50
('John',100),('Jane',200),('Mike',300);
45
51
```
52
+
This verifies that inserts work correctly and allows you to test small queries.
46
53
47
-
Or populate automatically with 1000 rows:
54
+
Populate Automatically with 1000 Rows
55
+
56
+
For benchmarking, larger datasets give more meaningful results. You can use a stored procedure to generate rows programmatically:
48
57
49
58
```sql
50
59
DELIMITER //
@@ -62,15 +71,14 @@ DELIMITER ;
62
71
CALL populate_benchmark_data();
63
72
DROP PROCEDURE populate_benchmark_data;
64
73
```
65
-
- The table `benchmark_table` has three columns: `record_id` (primary key), `username`, and `score`.
66
-
- You can insert a few rows manually for testing or use a procedure to generate **1000 rows automatically** for more realistic benchmarking
74
+
At this stage, you have a populated `benchmark_table` inside `benchmark_db`. This provides a realistic dataset for running `mysqlslap`, enabling you to measure how MySQL performs on Azure Cobalt 100 under read-heavy, write-heavy, or mixed workloads.
67
75
68
76
## Run a Simple Read/Write Benchmark
69
77
70
-
Once your table is ready, you can use `mysqlslap` to simulate multiple clients performing queries. This helps test MySQL’s performance under load.
78
+
With the `benchmark_table` populated, you can run a synthetic workload using mysqlslap to simulate multiple clients performing inserts or queries at the same time. This tests how well MySQL handles concurrent connections and query execution.
-**--query:** The SQL statement to run repeatedly.
80
88
-**--create-schema:** The database in which to run the query.
81
89
82
-
You should see output similar to the following:
90
+
You should see output similar to:
83
91
84
92
```output
85
93
Benchmark
@@ -90,13 +98,15 @@ Benchmark
90
98
Average number of queries per client: 1
91
99
```
92
100
93
-
Below command runs a **read benchmark** on your MySQL database using `mysqlslap`. It simulates multiple clients querying the table at the same time and records the results.
101
+
Run a Read Benchmark (table scan):
102
+
103
+
You can now run a test that simulates multiple clients querying the table at the same time and records the results:
94
104
95
105
```console
96
106
mysqlslap --user=admin --password="MyStrongPassword!" --host=127.0.0.1 --concurrency=10 --iterations=5 --query="SELECT * FROM benchmark_db.benchmark_table WHERE record_id < 500;" --create-schema=benchmark_db --verbose | tee -a /tmp/mysqlslap_benchmark.log
97
107
```
98
108
99
-
You should see output similar to the following:
109
+
You should see output similar to:
100
110
101
111
```output
102
112
Benchmark
@@ -109,11 +119,11 @@ Benchmark
109
119
110
120
## Benchmark Results Table Explained:
111
121
112
-
-**Average number of seconds to run all queries:** This is the average time it took for all the queries in one iteration to complete across all clients. It gives you a quick sense of overall performance.
113
-
-**Minimum number of seconds to run all queries:** This is the fastest time any iteration of queries took.
114
-
-**Maximum number of seconds to run all queries:** This is the slowest time any iteration of queries took. The closer this is to the average, the more consistent your performance is.
115
-
-**Number of clients running queries:** Indicates how many simulated users (or connections) ran queries simultaneously during the test.
116
-
-**Average number of queries per client:** Shows the average number of queries each client executed in the benchmark iteration.
122
+
Average number of seconds to run all queries: This is the average time it took for all the queries in one iteration to complete across all clients. It gives you a quick sense of overall performance.
123
+
Minimum number of seconds to run all queries: This is the fastest time any iteration of queries took.
124
+
Maximum number of seconds to run all queries: This is the slowest time any iteration of queries took. The closer this is to the average, the more consistent your performance is.
125
+
Number of clients running queries: Indicates how many simulated users (or connections) ran queries simultaneously during the test.
126
+
Average number of queries per client: Shows the average number of queries each client executed in the benchmark iteration.
117
127
118
128
## Benchmark summary on Arm64:
119
129
Here is a summary of benchmark results collected on an Arm64 **D4ps_v6 Ubuntu Pro 24.04 LTS virtual machine**.
@@ -123,21 +133,13 @@ Here is a summary of benchmark results collected on an Arm64 **D4ps_v6 Ubuntu Pr
123
133
| INSERT | 0.267 | 0.265 | 0.271 | 10 | 1 |
124
134
| SELECT | 0.263 | 0.261 | 0.264 | 10 | 1 |
125
135
126
-
## Benchmark summary on x86_64:
127
-
Here is a summary of the benchmark results collected on x86_64 **D4s_v6 Ubuntu Pro 24.04 LTS virtual machine**.
128
-
129
-
| Query Type | Average Time (s) | Minimum Time (s) | Maximum Time (s) | Clients | Avg Queries per Client |
The benchmark results on the Arm64 virtual machine show:
137
140
138
-
-**Balanced Performance for Read and Write Queries:** Both `INSERT` and `SELECT` queries performed consistently, with average times of **0.267s** and **0.263s**, respectively.
139
-
-**Low Variability Across Iterations:** The difference between the minimum and maximum times was very small for both query types, indicating stable and predictable behavior under load.
140
-
-**Moderate Workload Handling:** With **10 clients** and an average of **1 query per client**, the system handled concurrent operations efficiently without significant delays.
141
-
-**Key Takeaway:** The MySQL setup on Arm64 provides reliable and steady performance for both data insertion and retrieval tasks, making it a solid choice for applications requiring dependable database operations.
142
-
143
-
You have now benchmarked MySql on an Azure Cobalt 100 Arm64 virtual machine and compared results with x86_64.
141
+
Balanced Performance for Read and Write Queries: Both `INSERT` and `SELECT` queries performed consistently, with average times of 0.267s and 0.263s, respectively.
142
+
Low Variability Across Iterations: The difference between the minimum and maximum times was very small for both query types, indicating stable and predictable behavior under load.
143
+
Moderate Workload Handling: With 10 clients and an average of 1 query per client, the system handled concurrent operations efficiently without significant delays.
144
+
145
+
This demonstrates that the MySQL setup on Arm64 provides reliable and steady performance for both data insertion and retrieval tasks, making it a solid choice for applications requiring dependable database operations.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mysql-azure/create-instance.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,24 @@
1
1
---
2
-
title: Create an Arm based cloud virtual machine using Microsoft Cobalt 100 CPU
2
+
title: Create an Azure Cobalt 100 Arm64 virtual machine
3
3
weight: 3
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Introduction
9
+
## Prerequisites and setup
10
10
11
-
There are several ways to create an Arm-based Cobalt 100 virtual machine : the Microsoft Azure console, the Azure CLI tool, or using your choice of IaC (Infrastructure as Code). This guide will use the Azure console to create a virtual machine with Arm-based Cobalt 100 Processor.
11
+
There are several common ways to create an Arm-based Cobalt 100 virtual machine, and you can choose the method that best fits your workflow or requirements:
12
12
13
-
This learning path focuses on the general-purpose virtual machine of the D series. Please read the guide on [Dpsv6 size series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series) offered by Microsoft Azure.
13
+
- The Azure Portal
14
+
- The Azure CLI
15
+
- An infrastructure as code (IaC) tool
14
16
15
-
If you have never used the Microsoft Cloud Platform before, please review the microsoft [guide to Create a Linux virtual machine in the Azure portal](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu).
17
+
In this section, you will launch the Azure Portal to create a virtual machine with the Arm-based Azure Cobalt 100 processor.
18
+
19
+
This Learning Path focuses on general-purpose virtual machines in the Dpsv6 series. For more information, see the [Microsoft Azure guide for the Dpsv6 size series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series).
20
+
21
+
While the steps to create this instance are included here for convenience, you can also refer to the [Deploy a Cobalt 100 virtual machine on Azure Learning Path](/learning-paths/servers-and-cloud-computing/cobalt/).
0 commit comments