PostList

2015년 10월 6일 화요일

Install YCSB and benchmark Cassandra with 3 nodes

Description

Assumption
1) YCSB version 0.3.0


1. Launch Ubuntu instances
Ref: http://haanmo.blogspot.com/2015/02/1.html

Note: 
The link describes how to create Linux instance.
You need to create Ubuntu instance and create keys for Linux and Ubuntu separately.

2. Connect to EC2 instance with PuTTY
Ref: http://haanmo.blogspot.com/2015/02/1_13.html

Note: 
Check Auto-login username should be "ubuntu"

3. Change root password
sudo passwd root
yourpw

su
yourpw

4. Install Oracle Java 8 in Ubuntu or Linux Mint via PPA
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

5. Set Java environment variables
sudo apt-get install oracle-java8-set-default
sudo apt-get update

6. Install YCSB
curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.3.0/ycsb-0.3.0.tar.gz
tar xfvz ycsb-0.3.0.tar.gz
cd ycsb-0.3.0

7. Create workload files in workload folder (do not include ------ )
nano workload_test10
-------------------------------------------------------------
recordcount=255550
operationcount=100000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=63.25892119
updateproportion=21.64707002
scanproportion=0
insertproportion=15.09400879
requestdistribution=uniform
------------------------------------------------------------

nano workload_test40
-------------------------------------------------------------
recordcount=569620
operationcount=400000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=63.25892119
updateproportion=21.64707002
scanproportion=0
insertproportion=15.09400879
requestdistribution=uniform
------------------------------------------------------------

nano workload_test80 
-------------------------------------------------------------
recordcount=985372
operationcount=800000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=63.25892119
updateproportion=21.64707002
scanproportion=0
insertproportion=15.09400879
requestdistribution=uniform
------------------------------------------------------------

nano workload_test160
-------------------------------------------------------------
recordcount=1806570
operationcount=1600000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=63.25892119
updateproportion=21.64707002
scanproportion=0
insertproportion=15.09400879
requestdistribution=uniform
------------------------------------------------------------

nano workload_test320
------------------------------------------------------------
recordcount=3407734
operationcount=3200000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=63.25892119
updateproportion=21.64707002
scanproportion=0
insertproportion=15.09400879
requestdistribution=uniform
------------------------------------------------------------

nano workload_test640
------------------------------------------------------------
recordcount=6445135
operationcount=6400000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=63.25892119
updateproportion=21.64707002
scanproportion=0
insertproportion=15.09400879
requestdistribution=uniform

------------------------------------------------------------


nano workload_test920

------------------------------------------------------------
recordcount=8922472
operationcount=9200000
workload=com.yahoo.ycsb.workloads.CoreWorkload
readallfields=true
readproportion=63.25892119
updateproportion=21.64707002
scanproportion=0
insertproportion=15.09400879
requestdistribution=uniform

------------------------------------------------------------

8. Create a folder for results
mkdir results_Cassandra

9. Load data
./bin/ycsb load cassandra-10 -P workloads/workload_test10 -p hosts=172.31.36.171 -threads 10 -p columnfamily=data -s > results_Cassandra/load_10

Note: 
Check your IP address and run just one commend for each experiment. 

10. Run benchmark
./bin/ycsb run cassandra-10 -P workloads/workload_test10 -p hosts=172.31.36.171 -threads 10 -p columnfamily=data -s > results_Cassandra/run_10

Note: 
Check your IP address

11. Clear data for next benchmark by using cqlsh (on Cassandra node)
truncate table data;


12. Check whether all data is cleared (on another Cassandra node).
/bin/nodetool -h localhost status;

//Note: You need to wait until all data is cleared on all nodes. 

CREATE TABLE usertable.data ( key blob, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC);

alter table data with GC_GRACE_SECONDS = 1;

13. Repeat benchmark with different configurations.

//Note: benchmark for 40 concurrent users
./bin/ycsb load cassandra-10 -P workloads/workload_test40 -p hosts=172.31.36.171 -threads 40 -p columnfamily=data -s > results_Cassandra/load_40

./bin/ycsb run cassandra-10 -P workloads/workload_test40 -p hosts=172.31.36.171 -threads 40 -p columnfamily=data -s > results_Cassandra/run_40

truncate table data;
CREATE TABLE usertable.data ( key blob, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC);

alter table data with GC_GRACE_SECONDS = 1;


/bin/nodetool -h localhost status;

//Note: benchmark for 80 concurrent users
./bin/ycsb load cassandra-10 -P workloads/workload_test80 -p hosts=172.31.36.171 -threads 80 -p columnfamily=data -s > results_Cassandra/load_80

./bin/ycsb run cassandra-10 -P workloads/workload_test80 -p hosts=172.31.36.171 -threads 80 -p columnfamily=data -s > results_Cassandra/run_80

truncate table data;
CREATE TABLE usertable.data ( key blob, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC);

alter table data with GC_GRACE_SECONDS = 1;



/bin/nodetool -h localhost status;


//Note: benchmark for 160 concurrent users
./bin/ycsb load cassandra-10 -P workloads/workload_test160 -p hosts=172.31.36.171 -threads 160 -p columnfamily=data -s > results_Cassandra/load_160

./bin/ycsb run cassandra-10 -P workloads/workload_test160 -p hosts=172.31.36.171 -threads 160 -p columnfamily=data -s > results_Cassandra/run_160

truncate table data;
CREATE TABLE usertable.data ( key blob, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC);

alter table data with GC_GRACE_SECONDS = 1;




/bin/nodetool -h localhost status;


//Note: benchmark for 320 concurrent users

./bin/ycsb load cassandra-10 -P workloads/workload_test320 -p hosts=172.31.36.171 -threads 320 -p columnfamily=data -s > results_Cassandra/load_320

./bin/ycsb run cassandra-10 -P workloads/workload_test320 -p hosts=172.31.36.171 -threads 320 -p columnfamily=data -s > results_Cassandra/run_320

truncate table data;
CREATE TABLE usertable.data ( key blob, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC);

alter table data with GC_GRACE_SECONDS = 1;



/bin/nodetool -h localhost status;


//Note: benchmark for 640 concurrent users

./bin/ycsb load cassandra-10 -P workloads/workload_test640 -p hosts=172.31.36.171 -threads 640 -p columnfamily=data -s > results_Cassandra/load_640

./bin/ycsb run cassandra-10 -P workloads/workload_test640 -p hosts=172.31.36.171 -threads 640 -p columnfamily=data -s > results_Cassandra/run_640

truncate table data;
CREATE TABLE usertable.data ( key blob, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC);

alter table data with GC_GRACE_SECONDS = 1;



/bin/nodetool -h localhost status;


//Note: benchmark for 920 concurrent users
./bin/ycsb load cassandra-10 -P workloads/workload_test920 -p hosts=172.31.36.171 -threads 920 -p columnfamily=data -s > results_Cassandra/load_920

./bin/ycsb run cassandra-10 -P workloads/workload_test920 -p hosts=172.31.36.171 -threads 920 -p columnfamily=data -s > results_Cassandra/run_920

truncate table data;
CREATE TABLE usertable.data ( key blob, column1 text, value blob, PRIMARY KEY (key, column1)) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC);

alter table data with GC_GRACE_SECONDS = 1;




/bin/nodetool -h localhost status;

댓글 없음:

댓글 쓰기