linux-on-ibm-z/mongo-bench

Name: mongo-bench

Owner: LinuxONE and Linux on z Systems Open-source Team

Description: Mongo-bench is a benchmark tool for MongoDB.

Created: 2017-06-01 16:01:17.0

Updated: 2017-06-14 14:11:09.0

Pushed: 2017-07-28 08:49:31.0

Homepage: null

Size: 60

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Tiny MongoDB Benchmark

This is a benchmark for assessing MongoDB performance in a SaaS environment when running a lot of instances on a single box/VM. The benchmark is split into a load and a run phase. During the load phase, random data is inserted into MongoDB, during the run phase the data is retrieved and new random data is inserted into MongoDB with a read/write ratio of 0.9.

Building

The benchmark is a Java project build with Apache Maven. In order to build the project from source run the package phase of Apache Maven:

vn package
Usage

The benchmark is written in Java and at least Java version 6 is required to run the generated jar file. Since a lot of latency data is recorded per thread, large amounts of memory are needed and the benchmark has to be run with a larger than normal heapsize during the run phase.

usage: java -jar mongo-bench-1.0-SNAPSHOT-jar-with-dependencies.jar [options]

Options:
 -c,--num-documents <arg>        The number of documents to create during the load phase
 -d,--duration <arg>             Run the bench for this many seconds
 -h,--help                       Show this help dialogue
 -j,--target-rate <arg>          Send request at the given rate. Accepts decimal numbers
 -l,--phase <arg>                The phase to execute [run|load]
 -n,--num-thread <arg>           The number of threads to run
 -p,--port <arg>                 The ports to connect to
 -r,--reporting-interval <arg>   The interval in seconds for reporting progress
 -s,--document-size <arg>        The size of the created documents
 -t,--target  <arg>              The target host to connect to
 -w,--warmup-time <arg>          The number of seconds to wait before actually collecting result data

The benchmark is split into two phases: Load and Run. Random data is added during the load phase which is in turn
retrieved from MongoDB in the run phase.
Examples

Loading 1000 documents of size 1024 bytes each into MongoDB instances on ports 30001-30010 on 9.114.14.14 using 8 threads:

ava -jar /tmp/mongo-bench-1.0-SNAPSHOT-jar-with-dependencies.jar -s 1024 -c 1000 -l load -p 30001-30010 -t 9.114.14.14 -n 8

Running the benchmark against ports 30001-30010 on the box 9.114.14.14 using 4 threads for 600 seconds with a 60 second warmup time and target an overall rate of 1000 transactions/second:

ava -Xmx16384m -jar /tmp/mongo-bench-1.0-SNAPSHOT-jar-with-dependencies.jar -l run -p 30001-30010 -t 9.114.14.14 -n 4 -w 60 -d 600 -j 1000

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.