Lampros - Weird Bricks

Installing Mongo 3.4 on CentOS 7 and a look at benchmarking it using YSCB (Yahoo! Cloud System Benchmark)

04 October, 2017 | CentOS

I'm trying to teach myself more Mongo, so here's my quick notes on how I installed it, configured it and run a benchmark using YSCB (Yahoo! Cloud System Benchmark).

Installing Mongo:

1. Add the Mongo repository file /etc/yum.repos.d/mongodb-org-3.4.repo:

name=MongoDB Repository

2. Install Mongo:

yum -y install mongodb-org

3. Check that the system limits are adjusted in /etc/systemd/system/ with:

grep Limit /etc/systemd/system/

Sample output:


Mongo's recommendations are here: - scroll down to: "Linux distributions using systemd"

4. Enable and start Mongo:

systemctl enable mongod
systemctl start mongod

Installing YSCB (Yahoo! Cloud System Benchmark):

YSCB requires Java. Let's install it:

1. Download Java:

yum -y install java-1.8.0-openjdk

2. Set up the necessary paths for Java:

cd /tmp
java=`find /usr/lib/jvm/ja*/j* -maxdepth 0 -type d`
export JAVA_HOME=/usr/lib/jvm$java
export PATH=$PATH:$JAVA_HOME/bin/

3. Download YSCB:

cd /tmp
curl -O --location
tar xfvz ycsb-0.12.0.tar.gz
cd ycsb-0.12.0

4. Load the data to prepare for the test - the default is only for 1000 records:

./bin/ycsb load mongodb-async -s -P workloads/workloada

5. Run the actual test:

./bin/ycsb run mongodb-async -s -P workloads/workloada

6. Cleanup before running another test:

mongo ycsb --eval "db.dropDatabase()"

7. Run a test with more data - the `workloada` above only uses 1000 records - this one has 100k records - load the data first:

./bin/ycsb load mongodb -s -P workloads/workloada -p recordcount=100000 -threads 8

8. Run the actual test, with 100k operations and 2 threads:

./bin/ycsb run mongodb-async -s -P workloads/workloada -p operationcount=100000 -threads 2

9. Don't forget to clean up:

mongo ycsb --eval "db.dropDatabase()"