https://github.com/percona-lab/sysbench-mongodb-lua
https://github.com/percona-lab/sysbench-mongodb-lua
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/percona-lab/sysbench-mongodb-lua
- Owner: Percona-Lab
- License: apache-2.0
- Created: 2017-09-15T14:29:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-05T09:57:51.000Z (almost 3 years ago)
- Last Synced: 2025-05-05T22:17:55.955Z (9 months ago)
- Language: Lua
- Size: 20.5 KB
- Stars: 16
- Watchers: 5
- Forks: 14
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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