Analyze the performance of MongoDB on Arm servers
Introduction
Install MongoDB on Arm
Creating MongoDB test scenarios
Benchmark MongoDB on Arm with Yahoo Cloud Serving Benchmark (YCSB)
Three node replica set testing with YCSB
Alternative performance testing of MongoDB
Automate MongoDB Performance Benchmarking Infrastructure Setup with Pulumi
Next Steps
Analyze the performance of MongoDB on Arm servers
Recommended Tests on MongoDB
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.
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.
Load dataset
./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
Run 95/5 test:
./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
Run 100/0 test:
./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
Run 90/10 test:
./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
For more detailed information on all the parameters for running a workload refer to Running a Workload.
Other tests
For instructions on running any other tests or more details on the metrics reported, refer to the GitHub project for the YCSB. .