YCSB workloads evaluation for MongoDB as complete In-Memory

Please find the procedure followed to enable the complete In-memory MongoDB set-up.
 
Step1 :- To mount a RAM partition with 4GB
 
mount -t tmpfs tmpfs /mnt -o size=4096m
 
[root@my-host-name bin]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root
113G 9.0G 98G 9% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sda1 194M 31M 154M 17% /boot
tmpfs 4.0G 33M 3.9G 1% /mnt
[root@my-host-name bin]#
 
Step2 :- To start MongoDB with RAM Partition:
 
 
[root@my-host-name bin]# ./mongod --dbpath /mnt --logpath /mnt/rs.log --port 17017 --smallfiles --nojournal &
[1] 2694
[root@my-host-name bin]#
 
 
Step3 :- Script to run the workloads :-
You can refer to http://dbversity.com/how-to-do-yahoo-cloud-system-benchmark-ycsb-for-oracle-db/ for YCSB installation.
 
 
[root@my-host-name yb]# cat workload.sh
/opt/mongodb/bin/mongo my-host-name:17017/ycsb --eval "db.dropDatabase()"
cd /mongotest/yb
 
### To Load the workload data#####
./bin/ycsb load mongodb -s -P workloada -p mongodb.url=my-host-name:17017 -p mongodb.database=ycsb -p mongodb.writeConcern=journaled -p fieldcount=1 -p fieldlength=1000 -p recordcount=1000000 -p operationcount=1000000 -p readallfields=true -p hotspotdatafraction=1 -p insertorder=ordered -threads 50
 
for th in 10 25 30 50
do
 
for wl in a b c d f
do
 
echo "Results for $th thread - workload $wl are ... " >> /mongotest/yb/$th\_thread_$wl\_workload_logs.txt
 
./bin/ycsb run mongodb -s -P workloads/workload$wl -p mongodb.url=my-host-name:17017 -p mongodb.database=ycsb -p mongodb.writeConcern=journaled -p fieldcount=1 -p fieldlength=1000 -p recordcount=1000000 -p operationcount=1000000 -p readallfields=true -p hotspotdatafraction=1 -p insertorder=ordered -threads $th >> /mongotest/yb/$th\_thread_$wl\_workload_logs.txt
 
done
done
 
[root@my-host-name yb]#

  • Ask Question