Skip to content

Instantly share code, notes, and snippets.

@bookshelfdave
Last active October 8, 2015 13:58
Show Gist options
  • Save bookshelfdave/3342251 to your computer and use it in GitHub Desktop.
Save bookshelfdave/3342251 to your computer and use it in GitHub Desktop.
Testing the Riak YCSB

#Testing the Riak YCSB Implementation ###To build:

# Dependencies: Maven, Java 1.6+
git clone https://github.com/metadave/YCSB.git
cd YCSB
mvn clean package
# see if the build worked using the "basic" driver (ie not Riak)
./bin/ycsb load basic -P workloads/workloada
./bin/ycsb run basic -P workloads/workloada

###To run against a cluster: Create and specify a comma separated list of ip:ports in a file named riak.props:

riak_cluster_hosts=127.0.0.1:10017, 192.168.1.6:10027, 192.168.1.7:10037
riak_pool_enabled=true
riak_pool_total_max_connection=50
riak_pool_idle_connection_ttl_millis=1000
riak_pool_initial_pool_size=5
riak_pool_request_timeout_millis=1000
riak_pool_connection_timeout_millis=1000

Next, specify the props file as an additional property to load + run:

bin/ycsb load riak-1.3 -P workloads/workloada -P ./path/to/riak.props
bin/ycsb run riak-1.3 -P workloads/workloada -P ./path/to/riak.props

###To run a larger test: Create a file called riak_large.props that contains the following:

riak_cluster_hosts=127.0.0.1:10017, 127.0.0.1:10027, 127.0.0.1:10037, 127.0.0.1:10047  
riak_pool_enabled=true
riak_pool_total_max_connection=50
riak_pool_idle_connection_ttl_millis=1000
riak_pool_initial_pool_size=5
riak_pool_request_timeout_millis=1000
riak_pool_connection_timeout_millis=1000

recordcount=1000009
threadcount=10
target=5000

target is the number of concurrent ops/sec we are trying to achieve

See: https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload

Note: This test might take until the end of the internets to finish.

# you may want to start with a fresh install of Riak (or at least clear out the bitcask or leveldb dir)
bin/ycsb load riak-1.3 -P workloads/workloada  -P riak_large.props > results_load
bin/ycsb run riak-1.3 -P workloads/workloada   -P riak_large.props > results_run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment