環境準備
- 數據準備: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 &