An open API service indexing awesome lists of open source software.

https://github.com/percona-lab/sysbench-mongodb-lua


https://github.com/percona-lab/sysbench-mongodb-lua

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

# sysbench-mongodb-lua

How to setup enviroment



Ubuntu Xenial(16.04)



* install the latest sysbench
https://github.com/akopytov/sysbench

!!! That important that you use the latest available version of sysbench !!!

* install prerequisites for mongorover driver
bash# apt-get install libmongoc-dev libbson-dev luarocks


* install mongorover driver
bash# luarocks install mongorover --local


How to run test



= MongoDB specific options

--mongodb_host=STRING MongoDB: hostname [localhost]
--mongodb_port=STRING MongoDB: port [27017]
--mongodb_db=STRING MongoDB: database name [sbtest_test]

* prepare

./sysbench  oltp-mongo.lua --tables=10 --threads=10 --table-size=100 --mongodb-db=sbtest --mongodb-host=localhost --mongodb-port=27017  --rand-type=pareto prepare


* run oltp_rw
./sysbench  oltp-mongo.lua --tables=10 --threads=10 --table-size=100 --mongodb-db=sbtest --mongodb-host=localhost --mongodb-port=27017 --time=120 --report-interval=1 --rand-type=pareto run

Running the test with following options:
Number of threads: 10
Initializing random number generator from current time

Initializing worker threads...

Threads started!

General statistics:
total time: 120.0106s
total number of events: 100774

Latency (ms):
min: 10.30
avg: 11.91
max: 25.85
95th percentile: 14.21
sum: 1199874.10

Threads fairness:
events (avg/stddev): 10077.4000/30.69
execution time (avg/stddev): 119.9874/0.00

The metric is number of events(queries/transactions) per second: 100774/120 ~ 840 events per second

* run oltp_ro test

./sysbench  oltp-mongo.lua --tables=10 --threads=10 --table-size=100 --mongodb-db=sbtest --mongodb-host=localhost --mongodb-port=27017 --time=120 --read_only=on --report-interval=1 --rand-type=pareto run

* run point_select only query

./sysbench  oltp-mongo.lua --tables=10 --threads=10 --table-size=100 --mongodb-db=sbtest --mongodb-host=localhost --mongodb-port=27017 --time=120  --point_selects=1 --simple_ranges=0 --sum_ranges=0 --order_ranges=0 --distinct_ranges=0 --index_updates=0 --non_index_updates=0  --delete_inserts=0  --report-interval=1 --rand-type=pareto run



* cleanup
./sysbench  oltp-mongo.lua --tables=10 --threads=10 --table-size=100 --mongodb-db=sbtest --mongodb-host=localhost --mongodb-port=27017 cleanup