Skip to content

Instantly share code, notes, and snippets.

@pbailis
Created October 30, 2012 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbailis/3978273 to your computer and use it in GitHub Desktop.
Save pbailis/3978273 to your computer and use it in GitHub Desktop.
Cassandra YCSB benchmarking by value size
CASS_HOST=#host ip here
sec=90
records=100000
for threads in 10 20 40 50
do
for size in 10 1000 10000
do
# reset Cassandra on remote host here; something like
ssh ubuntu@$CASS_HOST "pkill -9 java; rm -rf /mnt/md0/cassandra/; cassandra &; disown"
sleep 10
bin/cassandra-cli -h $CASS_HOST -f setup-cass-ycsb.cql
bin/ycsb load cassandra-10 -P workloads/workloada -p hosts=$CASS_HOST -p fieldlength=$size -p fieldcount=1 -p recordcount=$records -s
bin/ycsb run cassandra-10 -P ../YCSB/workloads/workloada -threads $threads -p maxexecutiontime=$sec -p hosts=$CASS_HOST -p fieldlength=$size -p fieldcount=1 -p operationcount=100000 -p recordcount=$records -s > TR$threads-TH$thru-S$size.txt
done
done
where setup-cass-ycsb.cql is something like
create keyspace usertable
with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'
and strategy_options = {replication_factor:1};
use usertable;
@sangjinhan
Copy link

create column family data;

is needed at the end of setup-cass-ycsb.cql :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment