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/mongodb-on-azure/_index.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,15 @@ cascade:
7
7
8
8
minutes_to_complete: 30
9
9
10
-
who_is_this_for: This Learning Path is designed for software developers looking to migrate their MongoDB workloads from x86_64 to Arm-based platforms, specifically on the Microsoft Azure Cobalt 100 processors.
10
+
who_is_this_for: This Learning Path is designed for software developers looking to migrate their MongoDB workloads to Arm-based platforms, specifically on the Microsoft Azure Cobalt 100 processors.
11
11
12
12
learning_objectives:
13
-
- Provision an Azure Arm64 virtual machine using Azure console, with Ubuntu Pro 24.04 LTS as the base image.
14
-
- Deploy the MongoDB on an Azure ubuntu virtual machine.
15
-
- Perform MongoDB baseline testing and benchmarking on both x86_64 and Arm64 virtual machine.
13
+
- Provision an Azure Arm64 Cobalt 100 based virtual machine using Azure console, with Ubuntu Pro 24.04 LTS as the base image.
14
+
- Deploy MongoDB on an Azure Cobalt 100 based virtual machine.
15
+
- Perform MongoDB baseline testing and benchmarking on the Arm64 virtual machine.
16
16
17
17
prerequisites:
18
18
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6).
19
-
- Basic understanding of Linux command line.
20
19
- Familiarity with the [MongoDB architecture](https://www.mongodb.com/) and deployment practices on Arm64 platforms.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-azure/baseline-testing.md
+27-14Lines changed: 27 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ layout: learningpathall
8
8
9
9
10
10
### Baseline testing of MongoDB
11
-
Perform baseline testing by verifying MongoDB is running, logging into the shell, executing a few test queries, and monitoring live performance. This ensures the database is functioning correctly before starting any benchmarks.
11
+
In this section you will perform baseline testing by verifying MongoDB is running, logging into the shell, executing a few test queries, and monitoring live performance. This ensures the database is functioning correctly before starting any benchmarks.
12
12
13
13
1. Verify Installation & Service Health
14
14
@@ -17,11 +17,12 @@ ps -ef | grep mongod
17
17
mongod --version
18
18
netstat -tulnp | grep 27017
19
19
```
20
+
An explanation of what each command is doing:
20
21
-**ps -ef | grep mongod** – Checks if the MongoDB server process is running.
21
22
-**mongod --version** – Shows the version of MongoDB installed.
22
23
-**netstat -tulnp | grep 27017** – Checks if MongoDB is listening for connections on its default port 27017.
Run the command below to check how fast your storage can **randomly read small 4KB chunks** from a 100 MB file for 30 seconds, using one job, and then show a summary report:
52
+
To perform a storage and health check, run the command below. This command checks how fast your storage can randomly read small 4KB chunks from a 100 MB file for 30 seconds, using one job, followed by a summary report:
@@ -91,6 +92,13 @@ The output shows how fast it read data (**16.6 MB/s**) and how many reads it did
91
92
92
93
3. Connectivity and CRUD Sanity Check
93
94
95
+
To verify that the MongoDB server is reachable you will perform a connectivity check. You will run a sanity test of core database functionality and permissions, refered to as CRUD:
96
+
97
+
C - Create: Insert a new record/document into the database.
98
+
R - Read: Query the database to retrieve data.
99
+
U - Update: Modify an existing record.
100
+
D - Delete: Remove a record.
101
+
94
102
```console
95
103
mongosh --host localhost --port 27017
96
104
```
@@ -107,7 +115,7 @@ exit
107
115
```
108
116
These commands create a test record, read it, update its value, and then delete it a simple way to check if MongoDB’s basic **add, read, update, and delete** operations are working.
The command connected to MongoDB, switched to the **baselineDB** database, inserted **1,000 documents** into the perf collection, and then measured the execution time for counting documents where **value > 0.5**. The final output displayed the **query execution time** in milliseconds.
163
+
The command connected to MongoDB, switched to the `baselineDB` database, inserted 1,000 documents into the perf collection, and then measured the execution time for counting documents where value > 0.5. The final output displayed the query execution time in milliseconds.
154
164
155
-
You should see an output similar to:
165
+
You should see the Query Time output similar to:
156
166
157
167
```output
158
168
Query Time (ms): 2
159
169
```
160
170
161
171
5. Index Creation Speed Test
162
172
173
+
You will now run a performance sanity check that measures how long MongoDB takes to create an index on a given collection:
print("Index Creation Time (ms):", new Date() - start);
169
180
'
170
181
```
171
-
The test connected to MongoDB, switched to the **baselineDB** database, and created an index on the **value** field in the **perf** collection. The index creation process completed in **22 milliseconds**, indicating relatively fast index building for the dataset size.
182
+
The test connected to MongoDB, switched to the `baselineDB` database, and created an index on the value field in the `perf` collection. The index creation process completed in 22 milliseconds, indicating relatively fast index building for the dataset size.
172
183
173
-
You should see an output similar to:
184
+
You should see output similar to:
174
185
175
186
```output
176
187
Index Creation Time (ms): 22
177
188
```
178
189
179
190
6. Concurrency Smoke Test
180
191
192
+
You will now verify that MongoDB can handle concurrent client connections and inserts without errors:
**Five parallel MongoDB shell sessions** were executed, each inserting **1,000** test documents into the baselineDB.concurrent collection. All sessions completed successfully, confirming that concurrent data insertion works as expected.
223
+
Five parallel MongoDB shell sessions were executed, each inserting 1,000 test documents into the baselineDB.concurrent collection. All sessions completed successfully, confirming that concurrent data insertion works as expected.
211
224
212
-
The above operations confirm that MongoDB is installed successfully and is functioning as expected on the Azure Cobalt 100 (Arm64) environment.
225
+
With these tests you have confirmed that MongoDB is installed successfully and is functioning as expected on the Azure Cobalt 100 (Arm64) environment.
213
226
214
-
Now, your MongoDB instance is ready for further benchmarking and production use.
227
+
You are now ready to perform further benchmarking for MongoDB.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-azure/benchmarking.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ layout: learningpathall
8
8
9
9
## Benchmark MongoDB with **mongotop** and **mongostat**
10
10
11
-
This guide will help the user measure MongoDB’s performance in real time.
12
-
The user will install the official MongoDB database tools, start MongoDB, run a script to simulate heavy load, and watch the database’s live performance using **mongotop** and **mongostat**.
11
+
In this section, you will measure MongoDB's performance in real time.
12
+
You will install the official MongoDB database tools, start MongoDB and run a script to simulate heavy load. With the script running you will then meassure the database's live performance using **mongotop** and **mongostat**.
These commands download and unpack MongoDB’s official monitoring tools (**mongotop** & **mongostat**), then add them to your PATH so you can run them from any terminal.
23
+
These commands download and unpack MongoDB's official monitoring tools (**mongotop** & **mongostat**), then add them to your PATH so you can run them from any terminal.
24
24
25
25
2. Verify the Installation
26
26
@@ -30,7 +30,7 @@ mongostat --version
30
30
```
31
31
This checks that both tools were installed correctly and are ready to use.
These commands create a folder for MongoDB’s data, then start the database server in the background, allowing connections from any IP, and save logs for troubleshooting.
55
+
These commands create a folder for MongoDB's data, then start the database server in the background, allowing connections from any IP, and save logs for troubleshooting.
56
56
57
57
4. Create a Long-Running Load Script for Benchmarking
58
58
59
-
Save this script file as **long_system_load.js**:
59
+
Use a file editor of your choice and create a file named `long_system_load.js` with the content below:
This is the load generator script, it creates several collections and repeatedly **inserts, queries, updates** and **deletes** data. Running it simulates real application traffic so the monitors have something to measure.
112
+
This is the load generator script, it creates several collections and repeatedly inserts, queries, updates and deletes data. Running it simulates real application traffic so the monitors have something to measure.
113
113
114
114
{{% notice Note %}}
115
115
Before proceeding, the load script and the monitoring tools must be run in separate terminals simultaneously.
116
116
117
117
- The load script continuously generates activity in MongoDB, keeping the database busy with multiple operations.
118
118
- The mongotop and mongostat tools monitor and report this activity in real time as it happens.
119
119
120
-
If all commands are run in the same terminal, the monitoring tools will only start after the script finishes, preventing real-time observation of MongoDB’s performance.
120
+
If all commands are run in the same terminal, the monitoring tools will only start after the script finishes, preventing real-time observation of MongoDB's performance.
121
121
{{% /notice %}}
122
122
123
123
### Run the load script (start the workload) — Terminal 1
@@ -128,7 +128,7 @@ mongosh < long_system_load.js
128
128
129
129
This command tells the MongoDB shell to execute the entire script. The script will run through its cycles and print the progress while generating the read/write activity on the server.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-azure/create-instance.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ layout: learningpathall
8
8
9
9
## Introduction
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 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). In this section, you will use the Azure console to create a virtual machine with Arm-based Azure Cobalt 100 Processor.
12
12
13
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.
14
14
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).
15
+
While the steps to create this instance are included here for your convenience, you can also refer to the [Deploy a Cobalt 100 Virtual Machine on Azure Learning Path](/learning-paths/servers-and-cloud-computing/cobalt/)
16
16
17
17
#### Create an Arm-based Azure Virtual Machine
18
18
@@ -43,8 +43,4 @@ Creating a virtual machine based on Azure Cobalt 100 is no different from creati
43
43
44
44

45
45
46
-
{{% notice Note %}}
47
-
48
-
To learn more about Arm-based virtual machine in Azure, refer to “Getting Started with Microsoft Azure” in [Get started with Arm-based cloud instances](/learning-paths/servers-and-cloud-computing/csp/azure).
49
-
50
-
{{% /notice %}}
46
+
While the virtual machine ready, proceed to the next section to delpoy MongoDB on your running instance.
Check if MongoDB and mongosh is properly installed:
80
+
Check if MongoDB and mongosh are properly installed on your machine:
81
81
```console
82
82
mongod --version
83
83
mongosh --version
84
84
```
85
-
You should see an output similar to:
85
+
You should see output similar to:
86
86
```output
87
87
db version v8.0.12
88
88
Build Info: {
@@ -102,11 +102,11 @@ Build Info: {
102
102
103
103
### Connect to MongoDB via mongosh
104
104
105
-
Start interacting with MongoDB through its shell interface:
105
+
You can now start interacting with MongoDB through its shell interface:
106
106
```console
107
107
mongosh mongodb://127.0.0.1:27017
108
108
```
109
-
You should see an output similar to:
109
+
You should see output on your terminal similar to:
110
110
```output
111
111
Current Mongosh Log ID: 68b573411523231d81a00aa0
112
112
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.3.8
@@ -130,4 +130,4 @@ For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
130
130
test>
131
131
```
132
132
133
-
MongoDB installation is complete. You can now proceed with the baseline testing.
133
+
With this you have verified that the MongoDB installation is complete. You can now proceed with the baseline testing of MongoDB on your Azure Cobalt 100 based VM.
0 commit comments