# create cluster f=robert-test # choose of the below for the cluster size roachprod create $f -n 3 --local-ssd roachprod create $f -n 9 --local-ssd roachprod create $f -n 18 --local-ssd roachprod create $f -n 24 --local-ssd # setup the mount option for SSD dries roachprod run $f -- 'sudo umount /mnt/data1; sudo mount -o discard,defaults,nobarrier /dev/disk/by-id/google-local-ssd-0 /mnt/data1/; mount | grep /mnt/data1' # pick one of the binaries below. All 3 delivers the similiar results. The latest alpha has better instrumentation roachprod run $f -- 'wget -qO- https://binaries.cockroachdb.com/cockroach-v2.0.4.linux-amd64.tgz | tar xvz; cp cockroach-v2.0.4.linux-amd64/cockroach ./' roachprod run $f -- 'wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.0-alpha.20180702.linux-amd64.tgz | tar xvz; cp cockroach-v2.1.0-alpha.20180702.linux-amd64/cockroach ./' roachprod run $f -- 'wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.0-alpha.20180730.linux-amd64.tgz | tar xvz; cp cockroach-v2.1.0-alpha.20180730.linux-amd64/cockroach ./' # start the CockroachDB cluster and take a look at the admin ui roachprod start $f roachprod adminurl $f # get necessary 3rd party software to run YCSB such as JRE roachprod run $f -- 'sudo apt-get -y update; sudo apt-get -y install openjdk-8-jre' # required roachprod run $f -- 'sudo apt-get -y install htop sysstat nethogs' # optional for monitoring roachprod run $f -- 'curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.14.0/ycsb-0.14.0.tar.gz; tar xfvz ycsb-0.14.0.tar.gz' roachprod run $f -- 'curl -O --location https://jdbc.postgresql.org/download/postgresql-42.2.4.jar; mv postgresql-42.2.4.jar ycsb-0.14.0/lib/.' # upload the YCSB help code used in the below steps roachprod put $f ycsb.crdb.util.sh roachprod run $f -- 'PATH=~/:$PATH;. ~/ycsb.crdb.util.sh; ycsb_config' # setup db.properties file roachprod run $f:1 -- 'PATH=~/:$PATH;. ~/ycsb.crdb.util.sh; ycsb_schema' # setup ycsb database and usertable # load the inital data (adjust insertcount) # if 24 nodes is run, then 24 * insertcount amount of data will be inserted # remeber to set the insertcount on the run roachprod run $f -- 'PATH=~/:$PATH;. ~/ycsb.crdb.util.sh; threadperinstance=2; ycsb_load_local' # run the workload on each with various thread count roachprod run $f -- 'PATH=~/:$PATH;. ~/ycsb.crdb.util.sh; threadperinstance=2; operationcount=$(($threadperinstance*$operationcount)); ycsb_run_local' roachprod run $f -- 'PATH=~/:$PATH;. ~/ycsb.crdb.util.sh; threadperinstance=4; operationcount=$(($threadperinstance*$operationcount)); ycsb_run_local' roachprod run $f -- 'PATH=~/:$PATH;. ~/ycsb.crdb.util.sh; threadperinstance=8; operationcount=$(($threadperinstance*$operationcount)); ycsb_run_local' roachprod run $f -- 'PATH=~/:$PATH;. ~/ycsb.crdb.util.sh; threadperinstance=10; operationcount=$(($threadperinstance*$operationcount)); ycsb_run_local'