Demonstrates building and executing the original YCSB workload against a 3 node CockroachDB cluster. More information on YCSB can be found here: https://github.com/brianfrankcooper/YCSB/wiki.
This is included here as a functional example. This configuration should not be considered the basis for a performance evaluation.
crdb-0- CockroachDB nodecrdb-1- CockroachDB nodecrdb-2- CockroachDB nodelb- HAProxy acting as load balancerycsb- YCSB client container responsible for executing benchmark workload
- because operation order is important, execute
./up.shinstead ofdocker-compose up - visit the CockroachDB UI @ http://localhost:8080
- visit the HAProxy UI @ http://localhost:8081
- have fun!
The following environment variables in docker-compose.yml control workload execution...
WORKLOAD_NAME- The name of the workload to run. The default value isworkload-b-cockroach.WORKLOAD_TARGET_OPS- The target Operations per Second (OPS). The default value is100.WORKLOAD_RECORD_COUNT- The number or records to load into the database. The default value is20000.
For database configuration information, see db.properties.
The following args in docker-compose.yml are used to control the versions of the Postgres JDBC driver and YCSB. Feel free to modify if necessary.
POSTGRESQL_JDBC_VERSION- The version of the Postgres JDBC driver to download and use. The default value is42.2.5.GIT_BRANCH- The version of YCSB to checkout fromgit. The default value ismaster.
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://lb:5432/ycsb?sslmode=disable&application_name=ycsb&reWriteBatchedInserts=true
db.user=root
db.passwd=
db.batchsize=128
jdbc.fetchsize=10
jdbc.autocommit=true
jdbc.batchupdateapi=truerecordcount=20000
operationcount=1000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=0.5
updateproportion=0.5
scanproportion=0
insertproportion=0
requestdistribution=zipfianrecordcount=20000
operationcount=1000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=0.95
updateproportion=0.05
scanproportion=0
insertproportion=0
requestdistribution=zipfanrecordcount=20000
operationcount=1000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=1
updateproportion=0
scanproportion=0
insertproportion=0
requestdistribution=zipfianrecordcount=20000
operationcount=1000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=0.95
updateproportion=0
scanproportion=0
insertproportion=0.05
requestdistribution=latestrecordcount=20000
operationcount=1000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=0
updateproportion=0
scanproportion=0.95
insertproportion=0.05
requestdistribution=zipfian
maxscanlength=100
scanlengthdistribution=uniformrecordcount=20000
operationcount=1000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=0.5
updateproportion=0
scanproportion=0
insertproportion=0
readmodifywriteproportion=0.5
requestdistribution=zipfianYou can also run the following workloads
Use the following to execute arbitrary SQL on the CockroachDB cluster.
docker-compose exec crdb-0 /cockroach/cockroach sql --insecure --execute="select count(*) from ycsb.usertable;"docker exec -ti crdb-0 /bin/bash
docker exec -ti crdb-1 /bin/bash
docker exec -ti crdb-2 /bin/bash
docker exec -ti lb /bin/sh
docker exec -ti ycsb /bin/bash