redis.conf 配置详解

daemonize yes

pidfile /var/run/redis.pid

port 6379

#bind 127.0.0.1

unixsocket /var/run/redis.sock

timeout 10

loglevel notice

logfile /var/log/redis/redis-server.log

databases 16

################################ SNAPSHOTTING  #################################

save 900 1

save 300 10

save 60 10000

rdbcompression yes

dbfilename dump.rdb

dir /var/lib/redis

################################# REPLICATION #################################

# slaveof <masterip> <masterport>

# masterauth <master-password>

slave-serve-stale-data yes

################################## SECURITY ###################################

# requirepass foobared

################################### LIMITS ####################################

# maxclients 128

# maxmemory <bytes>

# maxmemory-policy volatile-lru

# maxmemory-samples 3

############################## APPEND ONLY MODE ###############################

appendonly no

# appendfsync always

appendfsync everysec

# appendfsync no

no-appendfsync-on-rewrite no

################################ VIRTUAL MEMORY ###############################

vm-enabled no

# vm-enabled yes

vm-swap-file /var/lib/redis/redis.swap

vm-max-memory 0

vm-page-size 32

vm-pages 134217728

vm-max-threads 4

############################### ADVANCED CONFIG ###############################

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

activerehashing yes

################################## INCLUDES ###################################

# include /path/to/local.conf

# include /path/to/other.conf

猜你喜欢

转载自871421448.iteye.com/blog/1921703