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/github-on-arm/instance.md
+1-1Lines changed: 1 addition & 1 deletion
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
## Introduction
10
10
11
-
This guide walks you through provisioning**Google Axion C4A Arm virtual machine** on GCP with the **c4a-standard-4 (4 vCPUs, 16 GB Memory)** machine type, using the **Google Cloud Console**.
11
+
This section walks you through creating**Google Axion C4A Arm virtual machine** on GCP with the **c4a-standard-4 (4 vCPUs, 16 GB Memory)** machine type, using the **Google Cloud Console**.
12
12
13
13
If you haven't got a Google Cloud account, you can follow the Learning Path on [Getting Started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/) to get started.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-gcp/_index.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,26 @@
1
1
---
2
2
title: Deploy MongoDB on Google Axion C4A virtual machine
3
3
4
-
minutes_to_complete: 60
4
+
minutes_to_complete: 15
5
5
6
-
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 Google Axion-based C4A virtual machines.
6
+
draft: true
7
+
cascade:
8
+
draft: true
9
+
10
+
who_is_this_for: This is an introductory topic for software developers looking to migrate their MongoDB workloads from x86_64 to Arm-based platforms, specifically on Google Axion-based C4A virtual machines.
7
11
8
12
learning_objectives:
9
-
- Provision an Arm virtual machine on the Google Cloud Platform using the C4A Google Axion instance family, and RHEL 9 as the base image.
10
-
- Install and run MongoDB on an Arm-based GCP C4A instances.
11
-
- Validate the functionality of MongoDB through baseline testing.
13
+
- Create an Arm cloud instance on the Google Cloud Platform
14
+
- Install and run MongoDB on the Arm-based GCP C4A instance.
12
15
- Benchmark the MongoDB performance on Arm using Yahoo Cloud Serving Benchmark (YCSB).
13
16
14
17
prerequisites:
15
18
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled.
16
-
- Basic understanding of Linux command line.
17
-
- 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-gcp/background.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ layout: "learningpathall"
8
8
9
9
## Google Axion C4A series
10
10
11
-
The Google Axion C4A series is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machine offer strong performance ideal for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
11
+
The C4A series is a family of Arm-based instance types for Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machine offer strong performance suitable for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
12
12
13
-
The C4A series provides a cost-effective alternative to x86 virtual machine while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
13
+
The C4A series provides a cost-effective virtual machine while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
14
14
15
15
To learn more about Google Axion, refer to the blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
Now that MongoDB is successfully installed on your GCP C4A Arm virtual machine, follow these steps to verify that the server is running correctly and accepting local connections.
9
10
10
-
Since MongoDB is installed successfully on your GCP C4A Arm virtual machine, follow these steps to validate that the server is running and accepting local connections.
11
-
12
-
## MongoDB Baseline Testing (Using **mongosh**)
13
-
14
-
1. Connect to MongoDB
11
+
### 1. Connect to MongoDB
15
12
16
13
Open a shell session to the local MongoDB instance:
14
+
17
15
```console
18
16
mongosh mongodb://127.0.0.1:27017
19
17
```
20
18
21
-
2. Create a Test Database and Collection:
19
+
### 2. Create a Test Database and Collection
22
20
23
-
```console
21
+
Switch to a new database and create a collection:
22
+
23
+
```javascript
24
24
use baselineDB
25
25
db.createCollection("test")
26
26
```
27
-
This creates a new database **baselineDB** and an empty collection named test.
28
27
29
-
You should see an output similar to:
28
+
This creates a new database named `baselineDB` and an empty collection called `test`.
29
+
30
+
Expected output:
30
31
31
32
```output
32
-
test> use baselineDB
33
-
... db.createCollection("test")
34
-
...
35
33
switched to db baselineDB
34
+
{ ok: 1 }
36
35
```
37
-
3. Insert 10,000 Test Documents:
36
+
37
+
### 3. Insert 10,000 Test Documents
38
+
39
+
Populate the collection with 10,000 timestamped documents:
38
40
39
41
```javascript
40
42
for (let i =0; i <10000; i++) {
@@ -45,168 +47,134 @@ for (let i = 0; i < 10000; i++) {
45
47
})
46
48
}
47
49
```
48
-
This simulates basic write operations with timestamped records.
49
-
10,000 documents will be cretaed and inserted into the test collection of the currently selected database.
50
-
The record field would increment from 0 to 9999. The status is always "new".
51
-
The timestamp would capture the insertion time for each document using ***new Date()***.
Verify read functionality by querying the first few documents:
63
65
64
-
Fetch a few documents to verify read functionality.
65
66
```javascript
66
67
db.test.find({ status:"new" }).limit(5)
67
68
```
68
-
This command is a simple read operation to verify that your data is inserted correctly. It queries the test collection in the current database, and only returns documents where the status is "new". ***limit(5)*** returns only the first 5 matching documents.
69
69
70
-
You should see an output similar to:
70
+
This returns the first 5 documents where `status` is `"new"`.
71
+
72
+
### 5. Update a Document
73
+
74
+
Update a specific document by changing its status:
71
75
72
-
```output
73
-
[
74
-
{
75
-
_id: ObjectId('6892dacbbd44e23df474e39a'),
76
-
record: 0,
77
-
status: 'new',
78
-
timestamp: ISODate('2025-08-06T04:32:11.090Z')
79
-
},
80
-
{
81
-
_id: ObjectId('6892dacbbd44e23df474e39b'),
82
-
record: 1,
83
-
status: 'new',
84
-
timestamp: ISODate('2025-08-06T04:32:11.101Z')
85
-
},
86
-
{
87
-
_id: ObjectId('6892dacbbd44e23df474e39c'),
88
-
record: 2,
89
-
status: 'new',
90
-
timestamp: ISODate('2025-08-06T04:32:11.103Z')
91
-
},
92
-
{
93
-
_id: ObjectId('6892dacbbd44e23df474e39d'),
94
-
record: 3,
95
-
status: 'new',
96
-
timestamp: ISODate('2025-08-06T04:32:11.104Z')
97
-
},
98
-
{
99
-
_id: ObjectId('6892dacbbd44e23df474e39e'),
100
-
record: 4,
101
-
status: 'new',
102
-
timestamp: ISODate('2025-08-06T04:32:11.106Z')
103
-
}
104
-
]
105
-
```
106
-
5. Update a Document:
107
-
108
-
Update a specific document's field to validate update capability.
Above command will find the first document where record is exactly 100, and updates that document by setting its status field to "processed".
113
79
114
-
You should see an output similar to:
80
+
This finds the document where `record` is 100 and updates the `status`.
81
+
82
+
Expected output:
115
83
116
84
```output
117
85
{
118
86
acknowledged: true,
119
-
insertedId: null,
120
87
matchedCount: 1,
121
-
modifiedCount: 1,
122
-
upsertedCount: 0
88
+
modifiedCount: 1
123
89
}
124
90
```
125
-
6. View the Updated Document Before Deletion
126
91
127
-
```console
92
+
### 6. View the Updated Document
93
+
94
+
Confirm that the document was updated:
95
+
96
+
```javascript
128
97
db.test.findOne({ record:100 })
129
98
```
130
-
This retrieves the document where record is 100, allowing you to verify that its status has been updated to "processed".
131
99
132
-
You should see output similar to:
100
+
Expected output:
133
101
134
102
```output
135
103
{
136
-
_id: ObjectId('689490ddb7235c65ca74e3fe'),
104
+
_id: ObjectId('...'),
137
105
record: 100,
138
106
status: 'processed',
139
-
timestamp: ISODate('2025-08-07T11:41:17.508Z')
107
+
timestamp: ISODate('...')
140
108
}
141
109
```
142
110
143
-
7. Delete a Document:
111
+
### 7. Delete a Document
112
+
113
+
The command below tells MongoDB to delete one document from the test collection, where record is exactly 100:
144
114
145
115
```javascript
146
116
db.test.deleteOne({ record:100 })
147
117
```
148
-
This tells MongoDB to delete one document from the test collection, where record is exactly 100.
149
118
150
-
You should see an output similar to:
151
-
152
-
```output
153
-
{ acknowledged: true, deletedCount: 1 }
154
-
```
155
-
Now, confirm the deletion:
119
+
Verify that it was deleted:
156
120
157
-
```console
121
+
```javascript
158
122
db.test.findOne({ record:100 })
159
123
```
160
-
The above command confirms that the document was successfully deleted.
161
124
162
-
You should see an output similar to:
125
+
Expected output:
126
+
163
127
```output
164
128
null
165
129
```
166
130
167
-
8. Measure Execution Time (Optional):
131
+
### 8. Measure Execution Time (Optional)
132
+
133
+
Measure how long it takes to insert 10,000 documents:
168
134
169
-
The below snippet measures how long it takes to insert documents for performance insight.
170
135
```javascript
171
136
var start =newDate()
172
137
for (let i =0; i <10000; i++) {
173
138
db.test.insertOne({ sample: i })
174
139
}
175
140
print("Insert duration (ms):", newDate() - start)
176
141
```
177
-
You should see an output similar to:
142
+
143
+
Sample output:
178
144
179
145
```output
180
146
Insert duration (ms): 4427
181
147
```
182
-
9. Count Total Documents:
183
148
184
-
Count total entries to confirm expected data volume.
149
+
### 9. Count Total Documents
150
+
151
+
Check the total number of documents in the collection:
152
+
185
153
```javascript
186
154
db.test.countDocuments()
187
155
```
188
-
You should see an output similar to:
156
+
157
+
Expected output:
189
158
190
159
```output
191
160
19999
192
161
```
162
+
193
163
The count **19999** reflects the total documents after inserting 10,000 initial records, adding 10,000 more (in point 8), and deleting one (record: 100).
194
164
195
-
10. Clean Up (Optional):
196
165
197
-
Deletes the **baselineDB** database and all its contents.
166
+
### 10. Clean Up (Optional)
167
+
168
+
For the sake of resetting the environment, this following command deletes the current database you are connected to in mongosh. Drop the `baselineDB` database to remove all test data:
169
+
198
170
```javascript
199
171
db.dropDatabase()
200
172
```
201
-
You should see an output similar to:
173
+
174
+
Expected output:
202
175
203
176
```output
204
177
{ ok: 1, dropped: 'baselineDB' }
205
178
```
206
179
207
-
The above is a destructive command that completely deletes the current database you are connected to in mongosh.
208
-
209
-
The above operations confirm that MongoDB is installed successfully and is functioning as expected on the GCP Arm64 environment.
210
-
211
-
Using **mongosh**, you validated key database operations such as **insert**, **read**, **update**, **delete**, and **count**.
212
-
Now, your MongoDB instance is ready for further benchmarking and production use.
180
+
These baseline operations confirm that MongoDB is functioning properly on your GCP Arm64 environment. Using `mongosh`, you validated key database capabilities including **inserts**, **queries**, **updates**, **deletes**, and **performance metrics**. Your instance is now ready for benchmarking or application integration.
0 commit comments