2016-08-03 56 views
1

YCSB Endpoint benchmark會讓您相信Cassandra是Nosql數據庫的金子。但是,在我們自己的盒子(8個內核包含超線程,60 GB內存,2 500 GB SSD)上重新創建結果,我們對工作負載b(大部分讀取,也就是95%讀取,5%更新)具有令人沮喪的讀取吞吐量。YCSB低讀取吞吐量cassandra

cassandra.yaml設置與端點設置完全相同,禁止不同的IP地址和磁盤配置(1個SSD用於數據,1個用於提交日誌)。雖然他們的吞吐量是每秒約38,000次操作,但無論(相對)多少個客戶端節點的線程數量是16,000。即一個具有256個線程的工作節點將報告~16,000 ops/sec,而4個節點將報告〜4,000 ops/sec

我已經爲SSD數據驅動器設置了readahead值爲8KB。我將在下面放置自定義工作負載文件。

使用iostat分析磁盤io & cpu使用情況時,似乎讀取吞吐量一直是〜200,000 KB/s,這似乎表明ycsb羣集吞吐量應該更高(記錄爲100字節)。 〜25-30%的cpu似乎低於%iowait,10-25%被用戶使用。

top和nload統計不是表面上瓶頸(< 50%內存使用率,10 Gb/s鏈路10-50 Mbits/sec)。

# The name of the workload class to use 
workload=com.yahoo.ycsb.workloads.CoreWorkload 

# There is no default setting for recordcount but it is 
# required to be set. 
# The number of records in the table to be inserted in 
# the load phase or the number of records already in the 
# table before the run phase. 
recordcount=2000000000 

# There is no default setting for operationcount but it is 
# required to be set. 
# The number of operations to use during the run phase. 
operationcount=9000000 

# The offset of the first insertion 
insertstart=0 
insertcount=500000000 

core_workload_insertion_retry_limit = 10 
core_workload_insertion_retry_interval = 1 

# The number of fields in a record 
fieldcount=10 

# The size of each field (in bytes) 
fieldlength=10 

# Should read all fields 
readallfields=true 

# Should write all fields on update 
writeallfields=false 

fieldlengthdistribution=constant 

readproportion=0.95 

updateproportion=0.05 

insertproportion=0 

readmodifywriteproportion=0 

scanproportion=0 

maxscanlength=1000 

scanlengthdistribution=uniform 

insertorder=hashed 

requestdistribution=zipfian 
hotspotdatafraction=0.2 

hotspotopnfraction=0.8 
table=usertable 

measurementtype=histogram 

histogram.buckets=1000 
timeseries.granularity=1000 
+0

吞吐量相對於客戶端的數量根本無法擴展。有了1個客戶端,我們可以獲得一定數量的操作數/秒。當並行運行2個ycsb客戶端時,每個獲得吞吐量/ 2,4個客戶端獲得吞吐量/ 4個。將併發讀取設置爲1024,並將ycsb客戶端中的核心和最大連接設置爲1024.nload在添加時顯示網絡流量沒有變化客戶端(從1個客戶端到2個端口時需要2個流量)。流量只有20 Mbits,所以絕對不是瓶頸。 – Rdesmond

+0

壓縮SSTables對性能沒有影響。 – Rdesmond

+0

你應該對你的問題更具體。 – cabad

回答

0

關鍵是增加了casssandra.yaml文件中的native_transport_max_threads。隨着評論中增加的設置(增加了ycsb客戶端的連接以及cassandra中的併發讀取/寫入),Cassandra跳到了~80,000 ops/sec。