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
You would also need the gatord binary for performance analysis. [gator](https://github.com/ARM-software/gator) is a target agent (daemon), part of Arm Streamline, a set of performance analysis tools. Use the following commands to build it from source.
44
+
You will also need the gatord binary for performance analysis. [gator](https://github.com/ARM-software/gator) is a target agent (daemon), part of Arm Streamline, a set of performance analysis tools. Use the following commands to build it from source.
Note: The security groups created by this script are lot less restrictive, to simplify the deployment process and to remove additional complexities. Please modify the ingress/egress rules as per your organizations' policy.
137
+
Note: The security groups created by this script are a lot less restrictive, to simplify the deployment process and to remove additional complexities. Please modify the ingress/egress rules as per your organization's policy.
138
138
139
139
```python
140
140
group = aws.ec2.SecurityGroup('p1-security-grouup',
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb/benchmark_mongodb-8.0.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ weight: 4 # (intro is 1), 2 is first, 3 is second, etc.
8
8
layout: "learningpathall"
9
9
---
10
10
11
-
To further measure the performance of MongoDB, you can run the [Yahoo Cloud Serving Benchmark](http://github.com/brianfrankcooper/YCSB).
11
+
To further measure the performance of MongoDB, you can run the [Yahoo Cloud Serving Benchmark](https://github.com/brianfrankcooper/YCSB).
12
12
13
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.
14
14
@@ -22,9 +22,10 @@ Install the additional software:
22
22
{{< tab header="Ubuntu" >}}
23
23
sudo apt install -y maven make gcc
24
24
{{< /tab >}}
25
-
{{< tab header="RHE/Amazon" >}}
25
+
{{< tab header="RHEL / Amazon Linux" >}}
26
26
sudo yum check-update
27
-
sudo yum install python2
27
+
# Python 2 may not be available via yum on recent RHEL/Amazon Linux versions.
28
+
# If needed, follow the manual installation steps below.
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.
72
+
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 client threads (default is 1); this example uses 10 threads.
72
73
73
74
## A simple Update/Read/Read Modify Write Test on MongoDB
74
75
75
76
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:
./bin/ycsb run mongodb -s -P workloads/workloada -p mongodb.url=mongodb://localhost:27017/ycsb?w=0 -threads 10
79
80
```
80
81
81
82
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.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb/create_replica_set.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,33 +8,33 @@ weight: 3 # (intro is 1), 2 is first, 3 is second, etc.
8
8
layout: "learningpathall"
9
9
---
10
10
## MongoDB test scenarios
11
-
To test Mongodb you need two parts. A instance running the testing software([YCSB](/learning-paths/servers-and-cloud-computing/mongodb/benchmark_mongodb-8.0)). one or more instances running MongoDB in some configuration. The recommended MongoDB test setup is a three node relica set. These three nodes are of equal size with one instance being desigated as the primary node( the target for test traffic) and the others as secondary nodes.
11
+
To test MongoDB you need two parts. An instance running the testing software([YCSB](/learning-paths/servers-and-cloud-computing/mongodb/benchmark_mongodb-8.0)). One or more instances running MongoDB in some configuration. The recommended MongoDB test setup is a three node replica set. These three nodes are of equal size with one instance being designated as the primary node (the target for test traffic) and the others as secondary nodes.
12
12
13
13
## What is a replica set?
14
14
15
15
A replica set is a group of instances that maintain the same dataset. A replica set contains many nodes, but three nodes are the most common for testing.
16
16
17
17
## What node size should I use?
18
18
19
-
The most common size for testing MongoDB is an 8 vCPU instance. You can test with any sized instance, but if you are looking for ideal testing conditions, 8 vCPUs is enough. Each node should have atleast 32GB of RAM.
19
+
The most common size for testing MongoDB is an 8 vCPU instance. You can test with any sized instance, but if you are looking for ideal testing conditions, 8 vCPUs is enough. Each node should have at least 32GB of RAM.
20
20
21
-
To achieve the best results, its recommended to keep the complete data set in memory. If you see disk access when running tests, increase the RAM size of your instances. Additional details about the recommended configuration are provided below.
21
+
To achieve the best results, it's recommended to keep the complete data set in memory. If you see disk access when running tests, increase the RAM size of your instances. Additional details about the recommended configuration are provided below.
22
22
23
23
## Creating replica sets
24
24
25
-
You can create replica sets of any size(two is the minimum). Three is recemmended but you can add as many as you like.
25
+
You can create replica sets of any size(two is the minimum). Three is recommended but you can add as many as you like.
26
26
27
27
## Three node replica sets
28
28
29
-
To creating a three node replica set, start by launching three [Armbased instance](/learning-paths/servers-and-cloud-computing/csp/) of equal size.
29
+
To create a three node replica set, start by launching three Arm-based instances of equal size.
30
30
31
-
[install](/learning-paths/servers-and-cloud-computing/mongodb/run_mongodb)Mongodb on all three instances.
31
+
[Install](/learning-paths/servers-and-cloud-computing/mongodb/run_mongodb)MongoDB on all three instances.
32
32
33
-
Once all three instances are up and running. Modify the service and configuration file for all instances.
33
+
Once all three instances are up and running, modify the service and configuration file for all instances.
34
34
35
35
## Modify the MongoDB configuration
36
36
37
-
Use a text editor to edit the file `/etc/mongodb.conf` and replace the contents of the file with the text below.
37
+
Use a text editor to edit the file `/etc/mongod.conf` and replace the contents of the file with the text below.
configString: "cache_size=16484MB" # 50% of your ram is recommened. Adding more helps depending on dataset.
53
+
configString: "cache_size=16484MB" # 50% of your ram is recommended. Adding more helps depending on dataset.
54
54
55
55
replication:
56
-
replSetName: "rs0" # Name of your replicaset
56
+
replSetName: "rs0" # Name of your replica set
57
57
oplogSizeMB: 5000
58
58
59
59
# network interfaces
@@ -70,14 +70,14 @@ setParameter:
70
70
tlsWithholdClientCertificate: true
71
71
```
72
72
73
-
**Details of what all these mean is below:**
73
+
**Details of what these mean are below:**
74
74
75
75
**systemLog:** Contains locations and details of where logging should be contained.
76
76
-**path:** Location for logging
77
77
78
-
**storage:**Its recommended to run test within memory to get achieve the best performance. This contains details on the engine used and location of storage.
78
+
**storage:**It's recommended to run test within memory to achieve the best performance. This contains details on the engine used and location of storage.
79
79
-**engine:** Wiredtiger is used in this case. Using a disk will add latency.
80
-
-**cache_size:** The minimum if using the recommend instance size is 50% of 32(16gb). But in testing using 18gb produced better results.
80
+
-**cache_size:** The minimum if using the recommended instance size is 50% of 32(16gb). However, testing showed that using 18GB produced better results.
81
81
82
82
**replication:** This is used for replica set setup.
83
83
-**replSetName:** This is the name of the replica set.
@@ -91,15 +91,15 @@ setParameter:
91
91
-**diagnosticDataCollectionDirectorySizeMB:** 400 is based on the docs.
92
92
-**honorSystemUmask:** Sets read and write permissions only to the owner of new files
93
93
-**lockCodeSegmentsInMemory:** Locks code into memory and prevents it from being swapped.
94
-
-**suppressNoTLSPeerCertificateWarning:**allows clients to connect without a certificate. (Only for testing purposes)
95
-
-**tlsWithholdClientCertificate:** Will not send the certification during communication. (Only for testing purposes)
94
+
-**suppressNoTLSPeerCertificateWarning:**Allows clients to connect without a certificate. (Only for testing purposes)
95
+
-**tlsWithholdClientCertificate:** Will not send the certificate during communication. (Only for testing purposes)
96
96
97
97
If you want to use encryption you will need to add the security and keyFile to your configuration. As well as change some of the parameters in the `mongod.conf` file.
98
98
99
-
Run this command to reload the new configurtion.
99
+
Run this command to reload the new configuration.
100
100
101
-
```
102
-
sudo service mongod restart
101
+
```bash
102
+
sudo systemctl restart mongod
103
103
```
104
104
105
105
## Modify the MongoDB service
@@ -136,15 +136,15 @@ LimitNPROC=64000
136
136
WantedBy=multi-user.target
137
137
```
138
138
139
-
details on these can be found here: https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
139
+
Details on these can be found in the [documentation](https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings).
140
140
141
141
Run this command to reload the service.
142
142
143
-
```
144
-
sudo ystemctl daemon-reload
143
+
```bash
144
+
sudo systemctl daemon-reload
145
145
```
146
146
147
-
**Once all three instances are created and have mongodb installed, select one to be your primary node. The remaining instances will be secondary nodes.**
147
+
**Once all three instances are created and have MongoDB installed, select one to be your primary node. The remaining instances will be secondary nodes.**
148
148
149
149
## Initialize the replica set
150
150
@@ -160,7 +160,7 @@ Connect to the primary node and run the following commands below.
160
160
161
161
2. Initialize the replica set with the following command:
As the test runs, the count will be printed periodically. It will increase until it reaches 1 million and then the test will end.
66
+
As the test runs, the progress count will be printed periodically. It will increase until it reaches 1 million, and then the test will end.
63
67
64
68
## Run Update-one test
65
69
66
-
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:
70
+
Similarly, to run an update test (updating one document per query) using 10, 20, and finally 30 threads for 1 hour each (3 hours total), run the following command:
@@ -73,7 +77,7 @@ For instructions on running any other tests or more details on the metrics repor
73
77
74
78
## View the results
75
79
76
-
During each test, statistics over the last second are printed every second in the console. The following is the output from the end of running Insert test:
80
+
During each test, statistics over the last second are printed to the console every second. After the test completes, final summary statistics are displayed. The following is example output from the end of the Insert test run:
The metrics are also output to the `stats-per-second-[mode].csv`which is located in the same folder as the jar file. `[mode]`is the executed mode(s), i.e. either`INSERT`, `UPDATE_ONE`, `UPDATE_MANY`, `COUNT_ONE`, `COUNT_MANY`, `ITERATE_ONE`, `ITERATE_MANY`, `DELETE_ONE` or `DELETE_MANY`.
103
+
Detailed per-second metrics are also output to a CSV file named `stats-per-second-[mode].csv`(e.g., `stats-per-second-INSERT.csv`), located in the same folder as the JAR file. `[mode]`corresponds to the executed mode(s), such as`INSERT`, `UPDATE_ONE`, `DELETE_ONE`, etc.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb/replica_set_testing.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,17 @@
2
2
# User change
3
3
title: "Three node replica set testing with YCSB"
4
4
5
-
6
5
weight: 5# (intro is 1), 2 is first, 3 is second, etc.
7
6
8
7
# Do not modify these elements
9
8
layout: "learningpathall"
10
9
---
11
10
12
-
talk about which one to get on and how to run tests and see output
13
-
14
11
## Recommended Tests on MongoDB
15
12
16
-
The most common three tests are **95/5** (95% read and 5% update), **100/0** (100% read and 0% update) and **90/10** (90% read and 10% update). In real world testing its recommended to run a **95/5** test.
13
+
The most common three tests are **95/5** (95% read and 5% update), **100/0** (100% read and 0% update) and **90/10** (90% read and 10% update). In real world testing it's recommended to run a **95/5** test.
17
14
18
-
Once you have loaded the dataset, run the selected test for approximately **five** minutes. This will allow the system to warm up before you start collecting performance data. The goal is to reach a high cpu utilization( 90+%). Adjusting the number of threads, operationscount and recordscount can help you achieve this. Examples below maybe need to be adjusted based on the instance type you selected.
15
+
Once you have loaded the dataset, run the selected test for approximately **five** minutes. This will allow the system to warm up before you start collecting performance data. The goal is to reach a high CPU utilization (90+%). Adjusting the number of threads, operationscount and recordscount can help you achieve this. Examples below may need to be adjusted based on the instance type you selected.
19
16
20
17
## Load dataset
21
18
@@ -32,7 +29,7 @@ Once you have loaded the dataset, run the selected test for approximately **five
0 commit comments