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/baseline-testing.md
+28-25Lines changed: 28 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,21 +6,20 @@ weight: 5
6
6
layout: learningpathall
7
7
---
8
8
9
-
10
-
### Baseline testing of MongoDB
9
+
## Baseline testing of MongoDB
11
10
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
11
13
-
1. Verify Installation & Service Health
12
+
##Verify MongoDB installation and service health (Azure Cobalt 100 Arm64)
14
13
15
14
```console
16
15
ps -ef | grep mongod
17
16
mongod --version
18
17
netstat -tulnp | grep 27017
19
18
```
20
-
An explanation of what each command is doing:
21
-
-**ps -ef | grep mongod**– Checks if the MongoDB server process is running.
22
-
-**mongod --version**– Shows the version of MongoDB installed.
23
-
-**netstat -tulnp | grep 27017**– Checks if MongoDB is listening for connections on its default port 27017.
19
+
What each command does:
20
+
-**ps -ef | grep mongod**checks if the MongoDB server process is running
21
+
-**mongod --version**shows the installed MongoDB version
22
+
-**netstat -tulnp | grep 27017**confirms MongoDB is listening on the default port 27017
## Run storage baseline with fio (random read IOPS on Ubuntu 24.04):
51
50
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:
51
+
This reads random 4 KB blocks from a 100 MB file for 30 seconds with one job and prints a summary
lat (usec) : 100=1.27%, 250=56.61%, 500=41.65%, 750=0.34%, 1000=0.06%
@@ -90,7 +89,7 @@ Disk stats (read/write):
90
89
```
91
90
The output shows how fast it read data (**16.6 MB/s**) and how many reads it did per second (**~4255 IOPS**), which tells you how responsive your storage is for random reads.
92
91
93
-
3. Connectivity and CRUD Sanity Check
92
+
##Connectivity and CRUD Sanity Check
94
93
95
94
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:
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.
166
+
This connects to MongoDB, selects the `baselineDB` database, inserts 1,000 documents into the `perf` collection, and measures the time to count documents where `value > 0.5`
164
167
165
-
You should see the Query Time output similar to:
168
+
You should see output similar to:
166
169
167
170
```output
168
171
Query Time (ms): 2
169
172
```
170
173
171
-
5. Index Creation Speed Test
174
+
## Index creation speed test in MongoDB
175
+
176
+
Measure how long MongoDB takes to create an index on a collection:
172
177
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);
180
184
'
181
185
```
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.
186
+
This creates an index on the `value` field in the `perf` collection and prints the time taken
183
187
184
188
You should see output similar to:
185
189
186
190
```output
187
191
Index Creation Time (ms): 22
188
192
```
189
193
190
-
6. Concurrency Smoke Test
194
+
##Concurrency smoke test with parallel mongosh sessions
191
195
192
-
You will now verify that MongoDB can handle concurrent client connections and inserts without errors:
196
+
Verify that MongoDB can handle concurrent client connections and inserts
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-azure/deploy.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ weight: 4
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Install MongoDB and mongosh on the Ubuntu Pro 24.04 LTS Arm instance
9
+
## Getting started
10
10
11
-
Install MongoDB and `mongosh on Ubuntu Pro 24.04 LTS (Arm64) by downloading the binaries, setting up environment paths, configuring data and log directories, and starting the server for local access and verification.
11
+
Install MongoDB and `mongosh` on Ubuntu Pro 24.04 LTS (Arm64) by downloading the binaries, setting up environment paths, configuring data and log directories, and starting the server for local access and verification.
12
12
13
13
## Install system dependencies
14
14
@@ -58,9 +58,9 @@ forked process: 3356
58
58
child process started successfully, parent exiting
59
59
```
60
60
61
-
6.**Install mongosh**
61
+
## Install mongosh
62
62
63
-
**mongosh** is the MongoDB shell used to interact with your MongoDB server. It provides a modern, user-friendly CLI for running queries and database operations.
63
+
`Mongosh` is the MongoDB shell used to interact with your MongoDB server. It provides a modern, user-friendly CLI for running queries and database operations.
0 commit comments