ssh nodeB
from nodeA
without any password.
One way to set this up is by running the following from nodeA
.
ssh-keygen -t ed25519
cp ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
temp
folder) and they are accessible in your PATH
. If that's not the case you can add this lines to ~/.bashrc
export CASSANDRA_HOME=/temp/path/to/cassandra
export COCKROACHDB_HOME=/temp/path/to/cockroach/db
export PATH=$PATH:$CASSANDRA_HOME/bin:$COCKROACHDB_HOME
pip install -r requirements.txt
nohup
config.json.example
. The name of the keys should be self-explanatory../setup.sh
once. This will create a HOSTNAME in the root folder.cassandra
cassandra.yaml
from the files in cassandra/conf
For example, cassandra-xcnd35.yaml
should belong under the server xcnd35
, which should
be located under the file $CASSANDRA_HOME/conf/cassandra.yaml
. The same applies for the
servers xcnd36
to xcnd39
.
$CASSANDRA_HOME/bin/cassandra
Note: These are also under the assumption that you have set the alias for CASSANDRA_HOME
and that you have your 5 hosts setup, else the command would fail.
Note: Alternativel, you can specify the configuration folder using:
$CASSANDRA_HOME/bin/cassandra -D cassandra.config=$CASSANDRA_HOME/conf
, where you specify
the configuration folder above.
python cassandra/setup.py [--schema SCHEMA_FILE] [--seed SEED_DIR]
. By default, the schema files can be found at cassandra/schema
folderThe following gives more information about the command line options for the cassandra setup script:
usage: setup.py [-h] [-c CONFIG_FILE] [--schema SCHEMA] [--seed SEED_DIR]
Parse input file and output file dest
optional arguments:
-h, --help show this help message and exit
-c CONFIG_FILE connection config file. defaults to config.json
--schema SCHEMA schema file to run (default to: cassandra/schema/schema.cql)
--seed SEED_DIR directory for seed file (default to: ../seed/data_files/)
It should take 5 - 10 minutes to setup the entire database. After this step, you can directly jump to the Run experiments section.
cockroachdb
Please follow this tutorial closely. We use the secure setup.
bash cockroach-start.sh [HOSTS]
.bash cockroach-start.sh xcnd35 xcnd36 xcnd37 xcnd38 xcnd39
Prerequisite: You've run the one-time setup ( ./setup.sh
). Look at the values stored in the file HOSTNAME in your root folder.
Assumptions:
cockroachdb/schema/schema*
to the fileserver hostname.--certs-dir
) accordingly.Note that the fileserver must be reachable by the node you are running the schema file from.
ssh HOSTNAME && cd [SEED_DIR] && python -m http.server 3000 &
cockroach sql --insecure --host $(hostname -s) --file [SCHEMA_FILE]
. By default, the schema files can be found at cockroachdb/schema
It should take 5 - 10 minutes to setup the entire database. After this step, you can directly jump to the Run experiments section.
The instructions below assume that the database are properly setup.
bash run.sh
. An interaction should look like the following.
$ bash run.sh
Found config.json... Please check if it is correct!
[config.json REDACTED]
Where is the project root located?
~/project
Which db are you using? (cassandra or cockroachdb)
cockroachdb
Please input 5 hostname separated by whitespace
xcnd35 xcnd36 xcnd37 xcnd38 xcnd39
Enter path to the workload you are running
~/seed/xact_files_A
logs/dd-mm_HH-MM
. The DBTYPE
file will indicate which db it is on.NOTE: It is possible that the logs might end up in two folders, such as logs/28-10_21-00
and logs/28-10_21-01
. As a result, it is your responsibility to consolidate these logs
into one common folder when running the performance metric retrieval.
In order to retrieve the performance metrics, performance/main.py
should be run
only when the experiment has completed.
usage: main.py [-h] [-c CONFIG_FILE] -d DIRECTORY [-m MODE] [-s] [-x]
optional arguments:
-h, --help show this help message and exit
-c CONFIG_FILE config file. defaults to config.json
-d DIRECTORY directory containing xact logs
-m MODE mode to get cassandra or cockroach stats
-s flag to skip printing client and xact stats
-x flag to print xact summary stats
python performance/main.py -d ./logs -m cassandra
python performance/main.py -d ./logs -m cockroach
-x
flag:
python performance/main.py -d ./logs -m cockroach -x
-s
flag: python performance/main.py -d ./logs -m cassandra -s
If you would like to run just a single client:
Before running, ensure that you have the configuration file in the root
directory. An example of the configuration file can be found in config.json.example
To execute, run the command: python cockroachdb/main.py -i <transaction file>
. More options can be seen below.
$ python cockroachdb/main.py -h
usage: main.py [-h] [-v] [-c CONFIG_FILE] [-i [INFILE]] [-o OUTDIR]
optional arguments:
-h, --help show this help message and exit
-v, --verbose print debug info
-c CONFIG_FILE connection config file. defaults to config.json
-i [INFILE] input file containing xacts
-o OUTDIR output directory for logs
python run_clients.py --db cockroachdb -i ~/seed/xact_files_A -n 0 &