Created
November 29, 2018 03:57
-
-
Save logonod/0a007e1c25a22f36b29af8af54db76cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mongod --port 27020 --dbpath ./ --replSet foo | |
| docker run --name arbiter -p 27020:27020 --net=host -it logonod/mongo:v1 | |
| rs.initiate( { | |
| _id : "foo", | |
| members: [ | |
| { _id: 0, host: "127.0.0.1:27017" }, | |
| { _id: 1, host: "127.0.0.1:27018" } | |
| ] | |
| }) | |
| from pymongo import MongoClient | |
| MongoClient('mongodb://localhost:27017,localhost:27018,localhost:27019/?replicaSet=foo') | |
| 430000000 | |
| sysbench oltp-mongo.lua --tables=2 --threads=10 --table-size=430000000 --mongodb-db=sbtest --mongodb-host=localhost --mongodb-port=27017 --time=120 --report-interval=1 --rand-type=pareto run | |
| sysbench oltp-mongo.lua --tables=2 --threads=10 --table-size=430000000 --mongodb-db=sbtest --mongodb-host=localhost --mongodb-port=27017 --time=120 --read_only=on --report-interval=1 --rand-type=pareto run | |
| sysbench oltp-mongo.lua --tables=2 --threads=10 --table-size=430000000 --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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment