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[official 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
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@ 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
+
Now that MongoDB is installed on your Google Axion C4A Arm VM, verify that the server is running and accepting local connections.
10
10
11
-
### 1. Connect to MongoDB
11
+
## Connect to MongoDB
12
12
13
13
Open a shell session to the local MongoDB instance:
14
14
15
15
```console
16
16
mongosh mongodb://127.0.0.1:27017
17
-
```
18
17
19
-
### 2. Create a Test Database and Collection
18
+
19
+
## Create a test database and collection
20
20
21
21
Switch to a new database and create a collection:
22
22
@@ -34,7 +34,7 @@ switched to db baselineDB
34
34
{ ok: 1 }
35
35
```
36
36
37
-
### 3. Insert 10,000 Test Documents
37
+
##Insert 10,000 test documents
38
38
39
39
Populate the collection with 10,000 timestamped documents:
40
40
@@ -48,9 +48,9 @@ for (let i = 0; i < 10000; i++) {
This returns the first 5 documents where `status` is `"new"`.
71
71
72
-
### 5. Update a Document
72
+
##Update a document
73
73
74
74
Update a specific document by changing its status:
75
75
@@ -89,7 +89,7 @@ Expected output:
89
89
}
90
90
```
91
91
92
-
### 6. View the Updated Document
92
+
##View the updated document
93
93
94
94
Confirm that the document was updated:
95
95
@@ -108,15 +108,15 @@ Expected output:
108
108
}
109
109
```
110
110
111
-
### 7. Delete a Document
111
+
##Delete a document
112
112
113
113
The command below tells MongoDB to delete one document from the test collection, where record is exactly 100:
114
114
115
115
```javascript
116
116
db.test.deleteOne({ record:100 })
117
117
```
118
118
119
-
Verify that it was deleted:
119
+
Verify deletion:
120
120
121
121
```javascript
122
122
db.test.findOne({ record:100 })
@@ -128,7 +128,7 @@ Expected output:
128
128
null
129
129
```
130
130
131
-
### 8. Measure Execution Time (Optional)
131
+
##Measure execution time (optional)
132
132
133
133
Measure how long it takes to insert 10,000 documents:
134
134
@@ -146,7 +146,7 @@ Sample output:
146
146
Insert duration (ms): 4427
147
147
```
148
148
149
-
### 9. Count Total Documents
149
+
##Count total documents
150
150
151
151
Check the total number of documents in the collection:
152
152
@@ -163,9 +163,11 @@ Expected output:
163
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).
164
164
165
165
166
-
### 10. Clean Up (Optional)
166
+
## 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.
167
169
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:
170
+
Drop the `baselineDB` database to remove all test data:
169
171
170
172
```javascript
171
173
db.dropDatabase()
@@ -177,4 +179,4 @@ Expected output:
177
179
{ ok: 1, dropped: 'baselineDB' }
178
180
```
179
181
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.
182
+
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
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,27 @@ layout: learningpathall
8
8
9
9
## Introduction
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