Skip to content

Instantly share code, notes, and snippets.

@ellios
Created October 13, 2012 13:43
Show Gist options
  • Save ellios/3884672 to your computer and use it in GitHub Desktop.
Save ellios/3884672 to your computer and use it in GitHub Desktop.
redis配置
daemonize yes
pidfile /var/run/redis.pid
port 6379
timeout 300
loglevel notice
logfile /opt/logs/redis/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir /opt/data/redis
#slaveof <masterip> <masterport>
#slave-serve-stale-data yes
#slave-priority 100
maxclients 0
maxmemory 2GB
maxmemory-policy volatile-lru
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
slowlog-log-slower-than 10000
slowlog-max-len 128
hash-max-zipmap-entries 512
hash-max-zipmap-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
activerehashing yes
# include /path/to/local.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment