配置内容

  1. bind 10.206.16.16
  2. port 5555
  3. loglevel debug
  4. logdir ./home/log
  5. dumpdir ./home/dump
  6. dir ./home/db
  7. pidfile ./home/tendisplus.pid
  8. slowlog ./home/log/slowlog
  9. storage rocks
  10. generallog 0
  11. checkkeytypeforsetcmd false
  12. kvStoreCount 10
  13. noexpire true
  14. maxBinlogKeepNum 100
  15. minBinlogKeepSec 600
  16. truncateBinlogIntervalMs 10000
  17. truncateBinlogNum 5000000
  18. logRecycleThreadnum 1
  19. executorThreadNum 16
  20. rocks.blockcachemb 512
  21. rocks.write_buffer_size 67108864
  22. rocks.target_file_size_base 67108864
  23. rocks.max_bytes_for_level_base 536870912
  24. rocks.max_background_compactions 3
  25. rocks.max_background_flushes 2
  26. #rocks.wal_dir /dev/shm/wal
  27. #rocks.max_write_buffer_number_to_maintain -1
  28. rocks.compress_type lz4
  29. level0NoCompress 0
  30. level1NoCompress 0
  31. rocks.level0_slowdown_writes_trigger 20
  32. rocks.max_write_buffer_number 8
  33. rocks.min_write_buffer_number_to_merge 6
  34. mapping-command dbsize emptyint
  35. rename-command flushdb flushdb_rename
  36. mapping-command keys emptymultibulk

说明:

机型:8核16g,1t云磁盘(写带宽260M/S)

get曲线大都有一个突然增大,主要是因为之前set结束的时候还遗留有不少的compaction任务,当这些compaction任务结束的时候,get性能就突然上来了。 上线的时候需要把dbsize keys两个命令的功能关闭,不然性能很差。同时把flushdb重命名,不然很危险。测试的时候关不关都无所谓了。

qps曲线

value:128B, set

image.png

value:128B, get

image.png

value:1024B, set

image.png

value:1024B,get

image.png

ue:4096B, set

image.png

value:4096B, get

image.png

HSET

具体内容: HSET myset:__rand_int__ element:__rand_int__ %s,data; 其中 data : 128B image.png

SADD

具体内容: SADD myset element:__rand_int__ image.png

LPUSH/RPUSH/LPOP/RPOP

具体内容: LPUSH mylist %s,data RPUSH mylist %s,data LPOP mylist RPOP mylist

其中 data : 128B image.png