配置内容
bind 10.206.16.16
port 5555
loglevel debug
logdir ./home/log
dumpdir ./home/dump
dir ./home/db
pidfile ./home/tendisplus.pid
slowlog ./home/log/slowlog
storage rocks
generallog 0
checkkeytypeforsetcmd false
kvStoreCount 10
noexpire true
maxBinlogKeepNum 100
minBinlogKeepSec 600
truncateBinlogIntervalMs 10000
truncateBinlogNum 5000000
logRecycleThreadnum 1
executorThreadNum 16
rocks.blockcachemb 512
rocks.write_buffer_size 67108864
rocks.target_file_size_base 67108864
rocks.max_bytes_for_level_base 536870912
rocks.max_background_compactions 3
rocks.max_background_flushes 2
#rocks.wal_dir /dev/shm/wal
#rocks.max_write_buffer_number_to_maintain -1
rocks.compress_type lz4
level0NoCompress 0
level1NoCompress 0
rocks.level0_slowdown_writes_trigger 20
rocks.max_write_buffer_number 8
rocks.min_write_buffer_number_to_merge 6
mapping-command dbsize emptyint
rename-command flushdb flushdb_rename
mapping-command keys emptymultibulk
说明:
机型:8核16g,1t云磁盘(写带宽260M/S)
get曲线大都有一个突然增大,主要是因为之前set结束的时候还遗留有不少的compaction任务,当这些compaction任务结束的时候,get性能就突然上来了。 上线的时候需要把dbsize keys
两个命令的功能关闭,不然性能很差。同时把flushdb
重命名,不然很危险。测试的时候关不关都无所谓了。
qps曲线
value:128B, set
value:128B, get
value:1024B, set
value:1024B,get
ue:4096B, set
value:4096B, get
HSET
具体内容: HSET myset:__rand_int__ element:__rand_int__ %s
,data; 其中 data : 128B
SADD
具体内容: SADD myset element:__rand_int__
LPUSH/RPUSH/LPOP/RPOP
具体内容: LPUSH mylist %s,data
RPUSH mylist %s,data
LPOP mylist
RPOP mylist
其中 data : 128B