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-gcp/_index.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,17 @@
1
1
---
2
-
title: Deploy MongoDB on Google Axion C4A virtual machine
2
+
title: Deploy MongoDB on an Arm-based Google Axion C4A VM
3
3
4
4
minutes_to_complete: 15
5
5
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.
6
+
who_is_this_for: This introductory topic is for software developers who want to migrate MongoDB workloads from x86_64 to Arm-based platforms, specifically on Google Axion-based C4A virtual machines.
11
7
12
8
learning_objectives:
13
-
- Create an Arm cloud instance on the Google Cloud Platform
14
-
- Install and run MongoDB on the Arm-based GCP C4A instance.
15
-
- Benchmark the MongoDB performance on Arm using Yahoo Cloud Serving Benchmark (YCSB).
9
+
- Create an Arm virtual machine on Google Cloud (C4A Axion family)
10
+
- Install and run MongoDB on the Arm-based C4A instance
11
+
- Benchmark MongoDB performance with Yahoo Cloud Serving Benchmark (YCSB)
16
12
17
13
prerequisites:
18
-
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled.
14
+
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-gcp/background.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
@@ -8,15 +8,14 @@ layout: "learningpathall"
8
8
9
9
## Google Axion C4A series
10
10
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.
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 highperformance 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
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
-
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).
15
+
To learn more about Google Axion, see the blog post[Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
16
16
17
17
## MongoDB
18
-
MongoDB is a popular open-source NoSQL database designed for high performance, scalability, and flexibility.
19
18
20
-
It stores data in JSON-like BSON documents, making it ideal for modern applications that require dynamic, schema-less data structures.
19
+
MongoDB is a popular open-source NoSQL database designed for performance, scalability, and flexibility. It stores data in JSON-like BSON documents, making it well suited to applications that require dynamic, schema-less data models.
21
20
22
-
MongoDB is widely used for web, mobile, IoT, and real-time analytics workloads. Learn more from the [MongoDB official website](https://www.mongodb.com/) and its [official documentation](https://www.mongodb.com/docs/).
21
+
MongoDB is widely used for web, mobile, IoT, and real-time analytics workloads. Learn more on the [MongoDB website](https://www.mongodb.com/) and in the [MongoDB documentation](https://www.mongodb.com/docs/).
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-gcp/baseline-testing.md
+23-16Lines changed: 23 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,22 @@ weight: 5
6
6
layout: learningpathall
7
7
---
8
8
9
-
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
+
## Overview
10
10
11
-
### 1. Connect to MongoDB
11
+
Now that MongoDB is installed on your Google Axion C4A Arm VM, verify that the server is running and accepting local connections.
12
+
13
+
Use mongosh to create a test database, run basic CRUD operations, and capture a quick insert-time baseline before you start benchmarking.
14
+
15
+
## Connect to MongoDB
12
16
13
17
Open a shell session to the local MongoDB instance:
14
18
15
19
```console
16
20
mongosh mongodb://127.0.0.1:27017
17
21
```
18
22
19
-
### 2. Create a Test Database and Collection
23
+
24
+
## Create a test database and collection
20
25
21
26
Switch to a new database and create a collection:
22
27
@@ -34,7 +39,7 @@ switched to db baselineDB
34
39
{ ok: 1 }
35
40
```
36
41
37
-
### 3. Insert 10,000 Test Documents
42
+
##Insert 10,000 test documents
38
43
39
44
Populate the collection with 10,000 timestamped documents:
40
45
@@ -48,9 +53,9 @@ for (let i = 0; i < 10000; i++) {
This returns the first 5 documents where `status` is `"new"`.
71
76
72
-
### 5. Update a Document
77
+
##Update a document
73
78
74
79
Update a specific document by changing its status:
75
80
@@ -89,7 +94,7 @@ Expected output:
89
94
}
90
95
```
91
96
92
-
### 6. View the Updated Document
97
+
##View the updated document
93
98
94
99
Confirm that the document was updated:
95
100
@@ -108,15 +113,15 @@ Expected output:
108
113
}
109
114
```
110
115
111
-
### 7. Delete a Document
116
+
##Delete a document
112
117
113
118
The command below tells MongoDB to delete one document from the test collection, where record is exactly 100:
114
119
115
120
```javascript
116
121
db.test.deleteOne({ record:100 })
117
122
```
118
123
119
-
Verify that it was deleted:
124
+
Verify deletion:
120
125
121
126
```javascript
122
127
db.test.findOne({ record:100 })
@@ -128,7 +133,7 @@ Expected output:
128
133
null
129
134
```
130
135
131
-
### 8. Measure Execution Time (Optional)
136
+
##Measure execution time (optional)
132
137
133
138
Measure how long it takes to insert 10,000 documents:
134
139
@@ -146,7 +151,7 @@ Sample output:
146
151
Insert duration (ms): 4427
147
152
```
148
153
149
-
### 9. Count Total Documents
154
+
##Count total documents
150
155
151
156
Check the total number of documents in the collection:
152
157
@@ -163,9 +168,11 @@ Expected output:
163
168
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).
164
169
165
170
166
-
### 10. Clean Up (Optional)
171
+
## Clean up (optional)
172
+
173
+
For the sake of resetting the environment, this following command deletes the current database you are connected to in mongosh.
167
174
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:
175
+
Drop the `baselineDB` database to remove all test data:
169
176
170
177
```javascript
171
178
db.dropDatabase()
@@ -177,4 +184,4 @@ Expected output:
177
184
{ ok: 1, dropped: 'baselineDB' }
178
185
```
179
186
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.
187
+
These baseline operations confirm that MongoDB is functioning properly on your GCP Arm64 environment. Using `mongosh`, you validated inserts, queries, updates, deletes, and basic performance timing. Your instance is now ready for benchmarking or application integration.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-gcp/benchmarking.md
+24-22Lines changed: 24 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,36 +5,36 @@ weight: 6
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
-
## MongoDB Benchmarking with YCSB (Yahoo! Cloud Serving Benchmark)
9
8
10
-
**YCSB (Yahoo! Cloud Serving Benchmark)** is an open-source tool for evaluating the performance of NoSQL databases under various workloads. It simulates operations such as reads, writes, updates, and scans to mimic real-world usage patterns.
9
+
## Benchmark MongoDB with YCSB
11
10
12
-
### Install YCSB (Build from Source)
11
+
YCSB (Yahoo! Cloud Serving Benchmark) is an open-source tool for evaluating NoSQL databases under various workloads. It simulates operations such as writes, updates, and scans to mimic production traffic.
13
12
14
-
First, install the required build tools and clone the YCSB repository:
13
+
## Install YCSB from source
14
+
15
+
Install build tools and clone YCSB, then build the MongoDB binding:
This phase inserts a set of documents into MongoDB to simulate a typical starting workload. By default, it inserts 1,000 records.
24
+
## Load initial data
26
25
26
+
Load a starter dataset (defaults to 1,000 records) into MongoDB:
27
27
```console
28
28
./bin/ycsb load mongodb -s \
29
29
-P workloads/workloada \
30
30
-p mongodb.url=mongodb://127.0.0.1:27017/ycsb
31
31
```
32
32
33
-
This prepares the database for the actual performance test.
33
+
This prepares the database for the performance test.
34
34
35
-
### Execute Benchmark Workload
35
+
##Run a mixed workload
36
36
37
-
Run the actual benchmark with the predefined workload. This command performs mixed read/write operations and collects performance metrics.
37
+
Run Workload A (50% reads, 50% updates) and collect metrics:
38
38
39
39
```console
40
40
./bin/ycsb run mongodb -s \
@@ -48,7 +48,7 @@ Run the actual benchmark with the predefined workload. This command performs mix
48
48
49
49
This simulates common real-world applications like session stores or shopping carts.
50
50
51
-
You’ll see performance output that looks like this:
51
+
Sample output:
52
52
53
53
```output
54
54
[READ], Operations, 534
@@ -65,39 +65,41 @@ You’ll see performance output that looks like this:
65
65
[OVERALL], Throughput(ops/sec), 1953.125
66
66
```
67
67
68
-
### YCSB Operations & Latency Metrics Explained
68
+
##Understand YCSB metrics
69
69
70
-
-**Operations Count**: Total operations performed for each type (e.g., READ, UPDATE).
70
+
-**Operations Count**: Total operations performed for each type (for example, READ, UPDATE).
71
71
-**Average Latency (us)**: The average time to complete each operation, measured in microseconds.
72
72
-**Min Latency / Max Latency (us)**: The fastest and slowest observed times for any single operation of that type.
73
73
74
74
With YCSB installed and benchmark results captured, you now have a baseline for MongoDB's performance under mixed workloads.
75
75
76
-
###Benchmark summary on x86_64
76
+
## Benchmark summary on x86_64
77
77
78
78
To better understand how MongoDB behaves across architectures, YCSB benchmark workloads were run on both an **x86_64 (C3 Standard)** and an **Arm64 (C4A Standard)** virtual machine, each with 4 vCPUs and 16 GB of memory, running RHEL 9.
79
79
80
-
The following benchmark results are collected on a c3-standard-4 (4 vCPU, 2 core, 16 GB Memory) x86_64 environment, running RHEL 9.
80
+
Results from a c3-standard-4 instance (4 vCPUs, 16 GB RAM) on RHEL 9:
- Arm results show low **average latencies**, **READ** at **313 us** and **UPDATE** at **384 us**.
100
-
-**50th** to **99th percentile** latencies remain stable, indicating consistent performance.
101
-
-**Max latency** spikes (**8279 us READ**, **26543 us UPDATE**) suggest rare outliers.
103
+
- Occasional max-latency outliers suggest transient spikes common in mixed workloads.
102
104
103
-
This Learning Path walked you through setting up and benchmarking MongoDB on an Arm-based GCP instance, highlighting how to run core operations, validate performance, and interpret benchmarking results with YCSB. Alongside, you explored some performance numbers, showing that Arm is a powerful and cost-efficient alternative for modern data-serving workloads like MongoDB.
105
+
With YCSB built and results captured, you now have a baseline for MongoDB performance on Arm-based Google Axion C4A. You can iterate on dataset size, thread counts, and workloads (A–F) to profile additional scenarios and compare cost-performance across architectures.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb-on-gcp/create-instance.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,28 +6,29 @@ weight: 3
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Introduction
9
+
## Overview
10
10
11
-
This section walks you through creating a **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 a 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
-
If you haven't set up a Google Cloud account, check out the Learning Path on [Getting Started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/).
13
+
If you haven't set up a Google Cloud account, see the Learning Path [Getting started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/).
14
14
15
-
###Create an Arm-based Virtual Machine (C4A)
15
+
## Create an Arm-based virtual machine (C4A)
16
16
17
-
To create a virtual machine based on the C4A Arm architecture:
18
-
1. Navigate to the [Google Cloud Console](https://console.cloud.google.com/).
19
-
2. Go to **Compute Engine** and click on **Create Instance**.
20
-
3. Under the **Machine Configuration**:
21
-
- Fill in basic details like **Instance Name**, **Region**, and **Zone**.
22
-
- Select the **Series** as `C4A`.
23
-
- Choose a machine type such as `c4a-standard-4`.
24
-

25
-
4. Under the **OS and Storage**, click on **Change**, and select **Red Hat Enterprise Linux** as the Operating System with **Red Hat Enterprise Linux 9** as the Version. Make sure you pick the version of image for Arm.
26
-
5. Under **Networking**, enable **Allow HTTP traffic** to allow interacting for later steps in the Learning Path.
27
-
6. Click on **Create**, and the instance will launch.
17
+
To create a VM based on the C4A Arm architecture:
18
+
19
+
1. Open the [Google Cloud Console](https://console.cloud.google.com/).
20
+
2. Go to **Compute Engine** and select **Create instance**.
21
+
3. In **Machine configuration**:
22
+
- Enter the **Instance name**, **Region**, and **Zone**.
23
+
- Set **Series** to `C4A`.
24
+
- Choose a machine type such as `c4a-standard-4`.
25
+

26
+
4. In **OS and storage**, select **Change**, choose **Red Hat Enterprise Linux** as the operating system, and **Red Hat Enterprise Linux 9** as the version. Make sure you select the **Arm** image.
27
+
5. In **Networking**, enable **Allow HTTP traffic** so you can test services later in this Learning Path.
28
+
6. Select **Create** to launch the instance.
28
29
29
30
{{% notice Important %}}
30
-
Avoid enabling Allow HTTP trafficpermanently, as it introduces a security vulnerability. Instead, configure access to allow only your own IP address for long-term use.
31
+
Do not leave **Allow HTTP traffic** enabled permanently. For long-term use, restrict access to only the IP addresses you need.
31
32
{{% /notice %}}
32
33
33
-
To access the Google Cloud Console, click the SSH button in your instance overview. This will open a command line interface (CLI), which you’ll use to run the remaining commands in this Learning Path. Continue to the next section to set up MongoDB on your instance.
34
+
To open a shell on the VM, select **SSH**in the instance details page. Use this terminal for the commands in the next sections, where you will install and configure MongoDB on your Axion C4A instance.
0 commit comments