码迷,mamicode.com
首页 > 其他好文 > 详细

环境安装备忘录 Redis redis-slave-端口号.conf

时间:2015-12-23 14:13:48      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:

#包含通用配置
include /etc/redis/redis-common.conf
#监听tcp端口
port 16380
#最大可用内存
maxmemory 100m
#内存耗尽时采用的淘汰策略:
# 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-16380.aof"
#rdb文件,只用于动态添加slave过程
dbfilename dump-16380.rdb
#cluster配置文件(启动自动生成)
cluster-config-file nodes-16380.conf
#部署在同一机器的redis实例,把auto-aof-rewrite搓开,防止瞬间fork所有redis进程做rewrite,占用大量内存
auto-aof-rewrite-percentage 80-100

 

 

 

==========================================================================

 

#包含通用配置
include /etc/redis/redis-common.conf
#监听tcp端口
port 16381
#最大可用内存
maxmemory 100m
#内存耗尽时采用的淘汰策略:
# 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-16381.aof"
#rdb文件,只用于动态添加slave过程
dbfilename dump-16381.rdb
#cluster配置文件(启动自动生成)
cluster-config-file nodes-16381.conf
#部署在同一机器的redis实例,把auto-aof-rewrite搓开,防止瞬间fork所有redis进程做rewrite,占用大量内存
auto-aof-rewrite-percentage 60-80

环境安装备忘录 Redis redis-slave-端口号.conf

标签:

原文地址:http://www.cnblogs.com/kaye0110/p/5069769.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!