ff11219650
* Adding mongo reactive stream * adding mongo stream binding * adding ""mmongodb2" binding * Update pom.xml * Update pom.xml * mongo reactive streams updates * Create README.md * helper * Update MongoDbReactiveStreamsClient.java * Update mongodbreactivestreams.properties * property name change to binding name * Update mongodb.properties * Update MongoDbReactiveStreamsClient.java * Removing explain method * Removing print statement on every read * Bumping mongo reactive stream version * Removed MongoDB2Client reference and added mongodbreactivestreams binding reference * Upgraded to Log4J2 * removed unused logback dependency * This is not required! * Resolving comments * adding back "AsyncMongoDbClient" to script and properties file * checkstyle fix --------- Co-authored-by: Ravi Tella <RaviTella@users.noreply.github.com> |
||
---|---|---|
.. | ||
conf | ||
src | ||
README.md | ||
pom.xml |
README.md
Quick Start
This section describes how to run YCSB on MongoDB.
1. Start MongoDB
First, download MongoDB and start mongod
. For example, to start MongoDB
on x86-64 Linux box:
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-x.x.x.tgz
tar xfvz mongodb-linux-x86_64-*.tgz
mkdir /tmp/mongodb
cd mongodb-linux-x86_64-*
./bin/mongod --dbpath /tmp/mongodb
Replace x.x.x above with the latest stable release version for MongoDB. See http://docs.mongodb.org/manual/installation/ for installation steps for various operating systems.
2. Install Java and Maven
Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html
and get the url to download the rpm into your server. For example:
wget http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.rpm?AuthParam=11232426132 -o jdk-7u40-linux-x64.rpm
rpm -Uvh jdk-7u40-linux-x64.rpm
Or install via yum/apt-get
sudo yum install java-devel
Download MVN from http://maven.apache.org/download.cgi
wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
sudo tar xzf apache-maven-*-bin.tar.gz -C /usr/local
cd /usr/local
sudo ln -s apache-maven-* maven
sudo vi /etc/profile.d/maven.sh
Add the following to maven.sh
export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}
Reload bash and test mvn
bash
mvn -version
3. Set Up YCSB
Download the YCSB zip file and compile:
curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.5.0/ycsb-0.5.0.tar.gz
tar xfvz ycsb-0.5.0.tar.gz
cd ycsb-0.5.0
4. Run YCSB
Now you are ready to run! First, lets load the data:
./bin/ycsb load mongodbreactivestreams -s -P workloads/workloada > outputLoad.txt
Then, run the workload:
./bin/ycsb run mongodbreactivestreams -s -P workloads/workloada > outputRun.txt
See the next section for the list of configuration parameters for MongoDB.
Log Level Control
Due to the mongodb driver defaulting to a log level of DEBUG, the log4j2.xml file is included with this module restricts the org.mongodb logging to WARN.
MongoDB Configuration Parameters
-
mongodb.url
- This should be a MongoDB URI or connection string.
- See http://docs.mongodb.org/manual/reference/connection-string/ for the standard options.
- Default value is
mongodb://localhost:27017/ycsb?w=1
- Default value of database is
ycsb
- This should be a MongoDB URI or connection string.
-
mongodb.batchsize
- Useful for the insert workload as it will submit the inserts in batches inproving throughput.
- Default value is
1
.
-
mongodb.upsert
- Determines if the insert operation performs an update with the upsert operation or a insert. Upserts have the advantage that they will continue to work for a partially loaded data set.
- Setting to
true
uses updates,false
uses insert operations. - Default value is
false
.
-
mongodb.writeConcern
- Deprecated - Use the
w
andjournal
options on the MongoDB URI provided by themongodb.url
. - Allowed values are :
errors_ignored
unacknowledged
acknowledged
journaled
replica_acknowledged
majority
- Default value is
acknowledged
.
- Deprecated - Use the
-
mongodb.readPreference
- Deprecated - Use the
readPreference
options on the MongoDB URI provided by themongodb.url
. - Allowed values are :
primary
primary_preferred
secondary
secondary_preferred
nearest
- Default value is
primary
.
- Deprecated - Use the
-
mongodb.maxconnections
- Deprecated - Use the
maxPoolSize
options on the MongoDB URI provided by themongodb.url
. - Default value is
100
.
- Deprecated - Use the
-
mongodb.threadsAllowedToBlockForConnectionMultiplier
- Deprecated - Use the
waitQueueMultiple
options on the MongoDB URI provided by themongodb.url
. - Default value is
5
.
- Deprecated - Use the
For example:
./bin/ycsb load mongodbreactivestreams -s -P workloads/workloada -p mongodb.url=mongodb://localhost:27017/ycsb?w=0