环境准备
- 数据准备: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}"}}
- 工具准备:yz-ycsb
- 命令准备:
- 只读装载数据: nohup bin/ycsb load hbase12 -P workloads/nocache_scan_r2 -threads 64 -p columnfamily=cf -p fieldlength=256 -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=256 -p hdrhistogram.percentiles=95,99,99.9,99.99 >> result.txt &
- 只写装载数据:nohup bin/ycsb load hbase12 -P workloads/sync_batch_w2 -threads 64 -p columnfamily=cf -p fieldlength=256 -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=256 -p hdrhistogram.percentiles=95,99,99.9,99.99 >> result.txt &
- 读写装载数据:nohup bin/ycsb load hbase12 -P workloads/mix_rw_1 -threads 64 -p columnfamily=cf -p fieldlength=256 -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=256 -p hdrhistogram.percentiles=95,99,99.9,99.99 >> result.txt &