Redis2.8プロファイル中国語の詳細

11384 ワード

add by zhj:本文の原文が見つかりませんでした.また、redisプロファイルの中国語翻訳も上手で、本稿と対照的に見ることができます.両方の文章はRedisで書かれています.8で紹介する
Redisでredis-serverサービスを直接起動する場合は、デフォルトのプロファイルが使用されます.redis-server xxxを採用する.confは、指定されたプロファイルに従ってRedisサービスを実行することができる.次はRedis 2です.8.9の配置書類の各項目の中国語解釈.


#daemonize no      , redis         ,         ,         yes
daemonize yes
#   redis         , Redis      pid      /var/run/redis.pid ,          。
#       redis    ,        pid      
pidfile /var/run/redis_6379.pid
#    redis      ,    6379
port 6379
#         ,            ,            
tcp-backlog 511
#    redis         IP      ,       ,         
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1
#              ,    。                  ,       
# 0       
timeout 0
# TCP keepalive
#   Linux  ,   ( )     ACKs    。             。    0 。
tcp-keepalive 0
#         ,       notice
# Redis         : debug 、 verbose 、 notice 、 warning ,    verbose
# debug         ,       
# varbose       ,   debug       
# notice      verbose ,       
# warning                     
loglevel notice
#    log     
#      stdout ,    ,          /dev/null 。
logfile /var/log/redis/redis.log
#       
#      16 ,       0 ,       0- ( database-1 )  
databases 16
################################   #################################
#        ,     :
#  save  
#          ,        ,            rdb 。
#             ,          
#              ,        
#  save 900 1 900       1   key    
#  save 300 10 300       300   key    
#  save 60 10000 60       10000   key    
# save 900 1
# save 300 10
# save 60 10000
#          。
stop-writes-on-bgsave-error yes
#          (     rdb   )      ,    yes
rdbcompression yes
# RDB           chcksum
rdbchecksum yes
#            ,     dump.rdb
dbfilename dump.rdb
#     
#                。
#                   redis       ,                     ,     ,
#                    ,                                。
# AOF              
#                  
dir /var/lib/redis-server/
#################################    #################################
#      .                   .
#        slav    ,   master     IP      ,  Redis    ,      master       
# slaveof 
#   master            (   requirepass       )
# slave      master    
# masterauth 
#                   ,          :
# 1)    slave-serve-stale-data     yes(      ) ,             
# 2)    slave-serve-stale-data     no ,   INFO   SLAVOF                
#      "SYNC with master in progress"
slave-serve-stale-data yes
#    slave        。  slave        (   master               )    ,        ,           。
#   Redis2.6  ,   slave   read-only
slaveread-only yes
#                  PINGs.      repl-ping-slave-period         ,    10  
# repl-ping-slave-period 10
# repl-timeout                ping       ,     60  
#       repl-timeout    repl-ping-slave-period
# repl-timeout 60
#   slave socket   SYNC     TCP_NODELAY
#     “ yes ” ,Redis            TCP                 slave ,              slave       ,     Linux kernel      ,    40    .
#      "no" ,       slave        ,              .
repl-disable-tcp-nodelay no
#            。
#          , slave                       。
#            slave    ,      。
# repl-backlog-size 1mb
#   master      slave  ,        。             slave             ( )。
# 0            
# repl-backlog-ttl 3600
#    master        ,       slave  ,           slave     master ,     0         master 。
slave-priority 100
#      N   slave   ,      <=M  ,  master           。
#        3   slave   ,    <=10     :
# min-slaves-to-write 3
# min-slaves-max-lag 10
#    0    
#     min-slaves-to-write   0 (  ), min-slaves-max-lag   10
##################################    ###################################
#                         。
#   :   redis      ,             ,                150K       ,                         
# requirepass foobared
#       .
#                     。    CONFIG              。
#    :
# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
#          ,              ""   ,  :
# rename-command CONFIG ""
###################################   ###################################
#              ,     , 
#Redis                Redis                ,
#     maxclients 0 ,      。
#            , Redis                max number of clients reached     
# maxclients 10000
#    Redis       , Redis               ,       , Redis                 Key
#    Redis                ,        ”noeviction” ,              ,   SET, LPUSH  。           
#   : Redis    vm   ,   Key     , Value      swap  
#      LRU      。
# maxmemory           redis       memcached       ,            DB 。
#    Redis                ,             
# maxmemory 
#             Redis          ?         
# volatile-lru ->    LRU              key (LRU:      Least RecentlyUsed )
# allkeys-lru ->    LRU        key
# volatile-random ->              key
# allkeys->random -> remove a randomkey, any key
# volatile-ttl ->         key(minor TTL)
# noeviction ->        ,         
#   :       ,        key     ,      Redis        
#     : volatile-lru
# maxmemory-policy volatile-lru 
# LRU   minimal TTL           ,          (        ) ,               。
# Redis        3        ,      maxmemory-samples     
# maxmemory-samples 3
############################## AOF###############################
#      , redis                   ,           ,          ,          、      ,               。
#    redis                         。
#    append only     , redis                     appendonly.aof    ,  redis      ,             。
#         appendonly.aof     ,   redis      BGREWRITEAOF   ,  appendonly.aof       。
#         asynchronous dumps   AOF
appendonly no
# AOF      (    : "appendonly.aof")
# appendfilename appendonly.aof
# Redis        AOF       :
# no:      ,      . Faster.
# always: always               . Slow, Safest.
# everysec:           ,       . Compromise.
#     "everysec" ,              。
#      Redis        ,        "no" ,              
#                    "always"
#         "everysec".
# appendfsync always
appendfsync everysec
# appendfsync no
# AOF       always    everysec  ,       (        AOF      )        I/O   
#     Linux           fsync()   。          ,   fsync            
#         ,           no-appendfsync-on-rewrite
no-appendfsync-on-rewrite no
# AOF     
#   AOF              Redis      BGREWRITEAOF          
#        : Redis                  (               ,              )
#                。                   ,       
#                AOF   ,                         AOF      
#    percentage   0        
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
################################ LUASCRIPTING #############################
#    Lua            5000   ( 5  ),    0            。
lua-time-limit 5000
################################LOW LOG################################
# Redis Slow Log              。        I/O          ,     ,        
#            slow log :      Redis                slowlog-log-slower-than(    ) ,
#      slow log    。                         
#            ,   1000000     。
#               ,     0            
slowlog-log-slower-than 10000
#          ,           
#      SLOWLOG RESET            
#         128 ,       128  ,             
slowlog-max-len 128
################################      #############################
#       , Redis      Pub/Sub    。
#          Redis         。            :
# K   Keyspace   ,  _keyspace@_        
# E   Keyevent   ,  _keysevent@_        
# g       (     ),  DEL, EXPIRE, RENAME, …
# $   String   
# s   Set   
# h   Hash   
# z         
# x       (   key      )
# e       (  key          )
# A   g$lshzxe    ,   ”AKE”         
# notify-keyspace-events      0              。            。
#   :   list      :
# notify-keyspace-events Elg
#           ,            ,           。
#            K   E   ,        。
notify-keyspace-events “”
##############################      ###############################
#   hash                          ,
# hash            (        )   ,            
# Redis Hash    Value          HashMap ,       2      ,
#    Hash         Redis                        ,         HashMap   ,    valueredisObject   encoding   zipmap,
#                  HashMap,    encoding   ht 。
hash-max-zipmap-entries 512
hash-max-zipmap-value 64 
#   Hash   ,     list              。
# list                         。
list-max-ziplist-entries 512
list-max-ziplist-value 64
# set                 ,                  。
set-max-intset-entries 512
#   hashe   list    ,     set                      
# zsort                         。
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
# Redis     100       1     CPU      redis   hash       hash ,         
#         ,           ,      Redis          2        ,       no 。
#               ,      yes ,             
activerehashing yes
#             ,                       ,
#          (             /                        )。
#                 :
# normal ->      
# slave -> slave   MONITOR    
# pubsub ->         pubsub channel   pattern     
#    client-output-buffer-limit    :
# client-output-buffer-limit   
#                ,                 (  )。
#   ,       32          16     /10  ,         
#              32    ,      16             10  ,      。
#    normal        ,              (     )     ,
#                                 。
#              0       
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb60
client-output-buffer-limit pubsub 32mb 8mb60
# Redis                ,           ,      Key ,  。
#                 ,  Redis      “ Hz ”        。
#      ,“ Hz ”      10 。
#        Redis          CPU  ,        key        Redis       ,            。
#     1   500   ,      100          。
#           10      ,                      100 。
hz 10 
#          AOF    ,         ,       32M       。
aof-rewrite-incremental-fsync yes