Retrive the project from this github repo
- Nguyen Hung Tam A0112059N
- Bui Do Hiep A0126502U
- Adrian Bratteby A0175596L
- Make sure that you setup all 5 nodes such that they have passwordless ssh
access to each other. It is required that you have
node 8
andnpm
installed. ssh into one server and do following steps - Clone this repo into the home dir of the node. Make sure that the folder is
named
CS4224-MongoDB
. Go insideCS4224-MongoDB
folder. - Update the
nodes.txt
with your nodes ip and hostnames. - Go inside
CS4224-MongoDB
folder and run
$ npm install
- Enable execution for all
.sh
files. Simply run
$ chmod +x *.sh
- Run following command to install mongodb on 5 nodes (mongodb will be
installed
/temp/mongodb/
) and start the shard cluster.
$ ./setup_shards.sh
- Run following command to download the data. If you want to test on other set
of data, make sure that your data folder is located at home directory and
named
data
before running the command
$ ./prepare_data.sh
Firstly ssh to one node and go inside CS4224-MongoDB
. Run following command
$ ./run.sh <number_clients> <concern_level> <max_transactions>
Where number_clients
is either 10, 20 or 40 and concern_level
is either
local
or majority
. max_transactions
is optional, indicate the maximum
number of transactions you want to run, if not specified, then all transactions
in the input fill will be executed.
Note that concern_level
= local
means using local
for read concern and 1
for write concern, while concern_level
= majority
means using majority
for
both read and write concern.
All log files are located in ~/log/
. Each client will print out in the
corresponding test case log folder named
~/log/<numner_clients>-<concern_level>
, while the stats file (throughput of
clients of the test case) is inside
~/log/<numner_clients>-<concern_level>-stats.txt
The summary of the test case
is inside ~/log/summary-<numner_clients>-<concern_level>.txt
which contains
min
max
average
throughput.