环境准备
- 工具准备:ycsb
- 数据准备:usertable 100 个region 并灌入数据。
hbase shell>n_splits=100
hbase shell> create 'usertable',{NAME=>'cf',DATA_BLOCK_ENCODING=>'DIFF',COMPRESSION=>'LZO'},{SPLITS => (1...n_splits).map{|i| "user#{1000+i*(9999-1000)/n_splits}"}}
nohup bin/ycsb load hbase12 -P workloads/sync_batch_w2 -threads 64 -p columnfamily=cf -p fieldlength=16 -p hdrhistogram.percentiles=95,99,99.9,99.99 >> result.txt &
- 命令准备:
- 只读 nohup bin/ycsb run hbase12 -P workloads/nocache_scan_r2 -threads 64 -p columnfamily=cf -p fieldlength=16 -p hdrhistogram.percentiles=95,99,99.9,99.99 >> result.txt &
- 只写 nohup bin/ycsb run hbase12 -P workloads/sync_batch_w2 -threads 64 -p columnfamily=cf -p fieldlength=16 -p hdrhistogram.percentiles=95,99,99.9,99.99 >> result.txt &
- 读写 nohup bin/ycsb run hbase12 -P workloads/mix_rw_1 -threads 64 -p columnfamily=cf -p fieldlength=16 -p hdrhistogram.percentiles=95,99,99.9,99.99 >> result.txt &
登录到服务器,每一台机器上部署ycsb,每一台服务器上同时执行只读的压测命令3次,也就是开3个实例,那么一共开9个实例,每个实例64并发压测。
收集压测日志中的吞吐与rt,以及系统性能指标: