redis配置文件redis-conf

#包含通用配置  
include /home/hadoop/redisCluster/redis-common.conf  
#监听tcp端口  
port 7000
#工作目录
dir  /home/hadoop/redisCluster/7000/
#最大可用内存  
maxmemory 10g  
#内存耗尽时采用的淘汰策略:  
# volatile-lru -> remove the key with an expire set using an LRU algorithm  
# allkeys-lru -> remove any key accordingly to the LRU algorithm  
# volatile-random -> remove a random key with an expire set  
# allkeys-random -> remove a random key, any key  
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)  
# noeviction -> don't expire at all, just return an error on write operations  
maxmemory-policy allkeys-lru  
#aof存储文件  
appendfilename "appendonly.aof"  
#不开启rdb存储,只用于添加slave过程  
dbfilename dump.rdb  
#cluster配置文件(启动自动生成)  
cluster-config-file nodes.conf  
#部署在同一机器的redis实例,把auto-aof-rewrite搓开,因为cluster环境下内存占用基本一致.  
#防止同一机器下瞬间fork所有redis进程做aof rewrite,占用大量内存(ps:cluster必须开启aof)  
auto-aof-rewrite-percentage 80-100

你可能感兴趣的:(Redis)