说明
Tendis存储版
提供了非常灵活的参数配置供使用者去调优,包括不同线程池大小,rocksdb的配置等等。
以下是一个NVME的配置参考,供参考。
硬件配置
CPU:2.50 GHz,48 core
DISK:NVMe SSD
MEM:192GB
配置模板
bind 127.0.0.1
port 51002
loglevel notice
cluster-enabled on
storage rocks
pidfile ./home/tendisplus.pid
# 数据和日志目录要提前创建
logdir ./home/log
dir ./home/db
dumpdir ./home/dump
# tendis的密码,按需指定
#requirepass tendis+test
#masterauth tendis+test
# binlog清理相关参数
truncateBinlogIntervalMs 1000
truncateBinlogNum 5000000
# 网络线程池数量,建议cpu数量/4,
netiothreadnum 8
# 工作线程池数量,建议略多于cpu数量
executorthreadnum 56
# 其他线程池数量配置,根据实际情况配置,想看参数配置
# incrPushThreadnum 4
# migrateSenderThreadnum 2
# migrateReceiveThreadnum 4
# migrateClearThreadnum 2
# rocksdb的blockcache大小,建议使用30%系统内存
rocks.blockcachemb 68719476736
# rocksdb相关配置
rocks.blockcache_strict_capacity_limit 0
rocks.cache_index_and_filter_blocks 1
rocks.max_open_files -1
rocks.compress_type snappy
#rocks.level0_compress_enabled no
#rocks.level1_compress_enabled no
rocks.level_compaction_dynamic_level_bytes 1
# [n >= 4, n <= 64, n ~= cpu_cores]
rocks.max_background_compactions 64
#rocks.max_write_buffer_number 16
#rocks.min_write_buffer_number_to_merge 14
rocks.write_buffer_size 67108864
rocks.target_file_size_base 67108864
rocks.max_bytes_for_level_base 536870912
# mapping-command dbsize emptyint
# mapping-command keys emptymultibulk
# 数据迁移相关配置
cluster-migration-slots-num-per-task 10
cluster-migration-rate-limit 500
cluster-migration-binlog-iters 20
cluster-migration-distance 10000