Skip to content

Commit 72ac724

Browse files
committed
Continue reviewing MongoDB, moving to draft during
1 parent cb91bfc commit 72ac724

File tree

9 files changed

+229
-192
lines changed

9 files changed

+229
-192
lines changed

content/learning-paths/servers-and-cloud-computing/mongodb/_index.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
---
2-
armips:
3-
- Neoverse
2+
title: Test the performance of MongoDB on Arm servers
3+
4+
draft: true
5+
cascade:
6+
draft: true
7+
48
author_primary: Pareena Verma
5-
layout: learningpathall
6-
learning_objectives:
7-
- Install and run MongoDB on an Arm server
8-
- Test MongoDB performance using open-source tooling
9-
- Measure and compare the performance of MongoDB on Arm versus other architectures with Yahoo Cloud Serving Benchmark (YCSB)
10-
learning_path_main_page: 'yes'
9+
1110
minutes_to_complete: 30
11+
12+
learning_objectives:
13+
- Install and run MongoDB on an Arm server.
14+
- Test MongoDB performance using open-source tooling.
15+
- Measure and compare the performance of MongoDB on Arm versus other architectures with Yahoo Cloud Serving Benchmark (YCSB).
16+
17+
prerequisites:
18+
- An Arm based instance from a cloud service provider. The recommend YCSB configuration requires a cluster of 3 Arm servers.
19+
20+
armips:
21+
- Neoverse
22+
1223
operatingsystems:
1324
- Linux
14-
prerequisites:
15-
- An Arm based instance from a cloud service provider.
25+
26+
layout: learningpathall
27+
learning_path_main_page: 'yes'
1628
skilllevels: Introductory
1729
subjects: Databases
18-
test_images:
19-
- mongo:latest
20-
test_link: https://github.com/armflorentlebeau/arm-learning-paths/actions/runs/4312122327
21-
test_maintenance: true
22-
test_status:
23-
- passed
24-
title: Test the performance of MongoDB on Arm servers
30+
test_maintenance: false
2531
tools_software_languages:
2632
- MongoDB
2733
- GCC
28-
- Snort
34+
2935
weight: 1
3036
who_is_this_for: This is an introductory topic for software developers using MongoDB
3137
as their database for mobile, IoT applications, content management, or real-time

content/learning-paths/servers-and-cloud-computing/mongodb/automate_setup_pulumi.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# User change
33
title: "Automate MongoDB Performance Benchmarking Infrastructure Setup with Pulumi"
44

5-
weight: 5 # (intro is 1), 2 is first, 3 is second, etc.
5+
weight: 8 # (intro is 1), 2 is first, 3 is second, etc.
6+
7+
draft: true
68

79
# Do not modify these elements
810
layout: "learningpathall"

content/learning-paths/servers-and-cloud-computing/mongodb/benchmark_mongodb-7.0.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# User change
33
title: "Benchmark MongoDB 7.0 on Arm with Yahoo Cloud Serving Benchmark (YCSB)"
44

5-
weight: 4 # (intro is 1), 2 is first, 3 is second, etc.
5+
draft: true
6+
7+
weight: 20 # (intro is 1), 2 is first, 3 is second, etc.
68

79
# Do not modify these elements
810
layout: "learningpathall"
Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,54 @@
11
---
22
# User change
3-
title: "Benchmark MongoDB 8.0 on Arm with Yahoo Cloud Serving Benchmark (YCSB)"
3+
title: "Benchmark MongoDB on Arm with Yahoo Cloud Serving Benchmark (YCSB)"
44

55
weight: 4 # (intro is 1), 2 is first, 3 is second, etc.
66

77
# Do not modify these elements
88
layout: "learningpathall"
99
---
10-
To further measure the performance of MongoDB, you will run the [Yahoo Cloud Serving Benchmark](http://github.com/brianfrankcooper/YCSB).
1110

12-
YCSB is an open sourced project which provides the framework and common set of workloads to evaluate the performance of different "key-value" and "cloud" serving stores. Here are the steps to run YCSB to evaluate the performance of MongoDB running on 64-bit Arm machine.
11+
To further measure the performance of MongoDB, you can run the [Yahoo Cloud Serving Benchmark](http://github.com/brianfrankcooper/YCSB).
1312

14-
## Additional software packages
13+
YCSB is an open source project which provides the framework and common set of workloads to evaluate the performance of different "key-value" and "cloud" serving stores. Use the steps below to run YCSB to evaluate the performance of MongoDB running on 64-bit Arm machine.
1514

16-
To run YCSB, additional software packages are required: default-jdk, default-jre, maven, make and Python.
15+
## Additional software packages
1716

17+
To run YCSB, additional software packages are required.
1818

19-
Install all other packages:
19+
Install the additional software:
2020

2121
{{< tabpane code=true >}}
2222
{{< tab header="Ubuntu" >}}
23-
sudo apt-get update
24-
sudo apt install -y default-jre default-jdk maven make gcc
25-
{{< /tab >}}
23+
sudo apt install -y maven make gcc
24+
{{< /tab >}}
25+
{{< tab header="RHE/Amazon" >}}
26+
sudo yum check-update
27+
sudo yum install python2
28+
{{< /tab >}}
2629
{{< /tabpane >}}
27-
{{% notice Python Note%}}
2830

29-
For Ubuntu 22.04 and 24.04 the `python` package may not be found. You can install Python 2.7 using:
31+
For Ubuntu 22.04 and 24.04, Python 2 is not available using the package manager.
32+
33+
You can install Python 2.7 using:
34+
3035
```console
36+
cd $HOME
3137
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
38+
tar xvf Python-2.7.18.tgz
3239
cd Python-2.7.18
33-
sudo ./configure --enable-optimizations
34-
make altinstall
35-
ln -s /usr/local/bin/python2.7 /usr/bin/python
40+
./configure --enable-optimizations
41+
make -j $nproc
42+
sudo make altinstall
43+
sudo ln -s /usr/local/bin/python2.7 /usr/local/bin/python
3644
```
37-
{{% /notice %}}
3845

3946
## Setup YCSB
4047

4148
Download the latest released YCSB zip file and uncompress it.
4249

4350
```bash
51+
cd $HOME
4452
mkdir ycsb && cd ycsb
4553
curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.17.0/ycsb-0.17.0.tar.gz
4654
tar xfvz ycsb-0.17.0.tar.gz
@@ -53,36 +61,24 @@ cd ycsb-0.17.0
5361
./bin/ycsb
5462
```
5563

56-
## Most Common MongoDB Test Setup
57-
58-
The recommended test setup is a relica set. Which contains three nodes each of equal size. A primary will be the node you send the YCSB traffic to.
59-
60-
## Recommended Tests on MongoDB
64+
## Load/Insert Test on MongoDB
6165

62-
The most common real world test to run is a 95/5 test, 95% read and 5% update. 100/0 and 90/10 are also popular. Run the following commands for about 5 mins before collecting data.
66+
To load and test the performance of loading data(INSERT) into default database `ycsb` at `localhost:27017` where MongoDB is running using the synchronous driver run the following command:
6367

64-
Load the dataset
6568
```console
66-
./bin/ycsb load mongodb -s -P workloads/workloadb -p mongodb.url=mongodb://localhost:27017 -p compressibility=2 -p fieldlengthdistribution=zipfian -p minfieldlength=50 -threads 64 -p recordcount=20000000
69+
./bin/ycsb load mongodb -s -P workloads/workloada -p mongodb.url=mongodb://localhost:27017/ycsb?w=0 -threads 10
6770
```
71+
The "-P" parameter is used to load property files. In this example, you used it load the workloada parameter file which sets the recordcount to 1000 in addition to other parameters. The "-threads" parameter indicates the number of threads and is set to 1 by default.
6872

69-
95/5
70-
```console
71-
./bin/ycsb run mongodb -s -P workloads/workloadb -p mongodb.url=mongodb://localhost:27017 -p minfieldlength=50 -p compressibility=2 -p maxexecutiontime=120 -threads 64 -p operationcount=40000000 -p recordcount=20000000 -p requestdistribution=zipfian -p readproportion=0.95 -p updateproportion=0.05
73+
## Update/Read/Read Modify Write Test on MongoDB
7274

73-
```
75+
To test the performance of executing a workload which includes running UPDATE, Read Modify Write(RMW) and/or READ operations on the data using 10 threads for example, use the following command:
7476

75-
100/0
7677
```console
77-
./bin/ycsb run mongodb -s -P workloads/workloadc -p mongodb.url=mongodb://Localhost:27017 -p minfieldlength=50 -p compressibility=2 -p maxexecutiontime=120 -threads 64 -p operationcount=40000000 -p recordcount=20000000 -p requestdistribution=zipfian -p readproportion=1.0 -p updateproportion=0.0
78-
78+
./bin/ycsb load mongodb -s -P workloads/workloada -p mongodb.url=mongodb://localhost:27017/ycsb?w=0
7979
```
8080

81-
90/10
82-
```console
83-
./bin/ycsb run mongodb -s -P workloads/workloadb -p mongodb.url=mongodb://localhost:27017 -p minfieldlength=50 -p compressibility=2 -p maxexecutiontime=120 -threads 64 -p operationcount=40000000 -p recordcount=20000000 -p requestdistribution=zipfian -p readproportion=0.90 -p updateproportion=0.10
84-
85-
```
81+
The workloads/workloada file in this example sets the following values `readproportion=0.5` and `updateproportion=0.5` which means there is an even split between the number of READ and UPDATE operations performed. You can change the type of operations and the splits by providing your own workload parameter file.
8682

8783
For more detailed information on all the parameters for running a workload refer to [this section](https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload).
8884

@@ -118,7 +114,6 @@ At the end of each test, statistics are printed to the console. Shown below is t
118114
[INSERT], Return=OK, 1000
119115
...
120116
```
121-
## Other tests
122117

123-
For instructions on running any other tests or more details on the metrics reported, refer to the [GitHub project for the YCSB](https://github.com/brianfrankcooper/YCSB/wiki/).
118+
Continue to the next section to run YCSB on a 3 node cluster.
124119

content/learning-paths/servers-and-cloud-computing/mongodb/benchmark_mongodb.md

Lines changed: 0 additions & 128 deletions
This file was deleted.

content/learning-paths/servers-and-cloud-computing/mongodb/mongodb_configuration.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@
22
# User change
33
title: "MongoDB test configuration and setup"
44

5-
weight: 3 # 1 is first, 2 is second, etc.
5+
draft: true
6+
7+
weight: 30 # 1 is first, 2 is second, etc.
68

79
# Do not modify these elements
810
layout: "learningpathall"
911
---
10-
The most popular test setup for read world testing is a replica set. A replica set of three equal sized nodes is created and initiated.
12+
13+
The most popular test setup for real world testing is a replica set. A replica set of three equal sized nodes is created and initiated.
1114

1215
## What is a replica Set?
13-
A replica set is a group of instances that maintain the same data set. A replica set contains many nodes and in our test three nodes. Out of the three nodes, one and only one member is the primary node, while the other nodes are secondary nodes.
16+
17+
A replica set is a group of instances that maintain the same data set. A replica set contains many nodes, and in this test it is 3 nodes. Of the 3 nodes, one node is the primary node, while the other nodes are secondary nodes.
1418

1519
## What node size should I use?
16-
The most common size for testing MongoDB is a 8vCPU instance. You are welcome to test with any sized machine. But If you are looking for ideal testing conditionals 8 is more than enough. 32 Gb of ram is recommended for testing.
20+
21+
The most common size for testing MongoDB is an 8 vCPU instance. You can test with any sized machine, but if you are looking for ideal testing conditions 8 nodes is enough. Each node should have 32GB of RAM.
1722

1823
## How should I run this test?
19-
It is recommended to avoid disk and keep the complete date set within memory. The recommended configuration is below and will be explains in detail.
24+
25+
You should keep the complete data set in memory. Additional details abut the recommended configuration are provided below.
2026

2127
## Mongod.conf
2228

content/learning-paths/servers-and-cloud-computing/mongodb/perf_mongodb.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Install the appropriate run-time environment to be able to use the performance t
1616

1717
{{< tabpane code=true >}}
1818
{{< tab header="Ubuntu" >}}
19-
sudo apt-get install -y openjdk-18-jre
19+
sudo apt install default-jre default-jdk -y
2020
{{< /tab >}}
2121
{{< tab header="RHE/Amazon" >}}
2222
sudo yum install java-17-openjdk
@@ -64,9 +64,11 @@ As the test runs, the count will be printed periodically. It will increase until
6464
## Run Update-one test
6565

6666
Similarly, to run this test, updating one document per query using 10, 20 and finally 30 threads for 1 hour each run (3 hours in total) run the following command:
67+
6768
```console
6869
java -jar $jarfile -m update_one -d 3600 -t 10 20 30 -db test -c perf
6970
```
71+
7072
For instructions on running any other tests or more details on the metrics reported, refer to the [github project for the performance tool](https://github.com/idealo/mongodb-performance-test#readme).
7173

7274
## View the results

0 commit comments

Comments
 (0)