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/benchmark_mongodb-8.0.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
@@ -80,7 +80,7 @@ To test the performance of executing a workload which includes running UPDATE, R
80
80
81
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.
82
82
83
-
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).
83
+
For more detailed information on all the parameters for running a workload refer to [Running a Workload.](https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload)
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mongodb/replica.md
+71-50Lines changed: 71 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
# User change
3
3
title: "Run YCSB using a 3 node replica set"
4
4
5
+
draft: true
6
+
5
7
weight: 5# (intro is 1), 2 is first, 3 is second, etc.
6
8
7
9
# Do not modify these elements
@@ -10,19 +12,70 @@ layout: "learningpathall"
10
12
11
13
The recommended MongoDB YCSB test setup is a relica set containing three nodes of equal size. The primary node is the node you send the YCSB traffic to and the others are secondary nodes.
12
14
13
-
## What is a replica Set?
15
+
## What is a replica set?
14
16
15
17
A replica set is a group of instances that maintain the same data set. A replica set contains many nodes, but 3 nodes are used for testing.
16
18
17
19
## What node size should I use?
18
20
19
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 vCPUs is enough. Each node should have 32GB of RAM.
20
22
21
-
## How should I run this test?
22
-
23
23
You should keep the complete data set in memory. Additional details abut the recommended configuration are provided below.
24
24
25
-
## Mongod.conf
25
+
## Create a replica set
26
+
27
+
Create a 3 node replica set by starting 3 Arm instances with the specifications above.
28
+
29
+
Install MongoDB on each node using the previously provided instructions.
30
+
31
+
Select 1 instance as the primary node and install YCSB on the instance.
32
+
33
+
## Initialize the replica set
34
+
35
+
1. Set variables with the IP addresses of each node:
36
+
37
+
```bash
38
+
PRIMARY_NODE_IP="<primary-node-ip>"
39
+
SECONDARY_NODE1_IP="<secondary-node1-ip>"
40
+
SECONDARY_NODE2_IP="<secondary-node2-ip>"
41
+
```
42
+
43
+
2. Connect to the primary node using the MongoDB shell:
44
+
45
+
```bash
46
+
mongosh --host <primary-node-ip>:27017
47
+
```
48
+
49
+
3. Initialize the replica set with the following command:
50
+
51
+
```bash
52
+
PRIMARY_NODE_IP="<primary-node-ip>"
53
+
SECONDARY_NODE1_IP="<secondary-node1-ip>"
54
+
SECONDARY_NODE2_IP="<secondary-node2-ip>"
55
+
56
+
mongosh --host $PRIMARY_NODE_IP:27017 <<EOF
57
+
rs.initiate({
58
+
_id: "rs0",
59
+
members: [
60
+
{ _id: 0, host: "$PRIMARY_NODE_IP:27017" },
61
+
{ _id: 1, host: "$SECONDARY_NODE1_IP:27017" },
62
+
{ _id: 2, host: "$SECONDARY_NODE2_IP:27017" }
63
+
]
64
+
})
65
+
EOF
66
+
```
67
+
68
+
3. Verify the replica set status:
69
+
70
+
```bash
71
+
mongosh --host $PRIMARY_NODE_IP:27017 <<EOF
72
+
rs.status()
73
+
EOF
74
+
```
75
+
76
+
## Modify the MongoDB configuration
77
+
78
+
Use a text editor to edit the file `/etc/mongodb.conf` file and replace the contents of the file with the text below.
**systemLog:** Contains locations and details of where logging should be contained.
61
115
- **path:** Location for logging
62
116
@@ -79,74 +133,41 @@ setParameter:
79
133
- **suppressNoTLSPeerCertificateWarning:** allows clients to connect without a certificate. (Only for testing purposes)
80
134
- **tlsWithholdClientCertificate:** Will not send the certification during communication. (Only for testing purposes)
81
135
82
-
If you would like 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.
136
+
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.
83
137
84
-
## Most Common MongoDB Test Setup
85
-
86
-
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.
87
138
88
139
## Recommended Tests on MongoDB
89
140
90
-
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.
141
+
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.
142
+
143
+
Run the following commands for about 5 mins before collecting data.
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).
116
-
117
-
## View the results
118
-
119
-
At the end of each test, statistics are printed to the console. Shown below is the output from the end of Load/Insert test
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/).
172
+
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/).
0 commit comments