Ticket #23290: redis.conf.sample.in.diff

File redis.conf.sample.in.diff, 6.3 KB (added by brianjlandau@…, 15 years ago)

Config file patch

  • redis.conf.sample.in

    old new  
    1919# Close the connection after a client is idle for N seconds (0 to disable)
    2020timeout 300
    2121
     22# Set server verbosity to 'debug'
     23# it can be one of:
     24# debug (a lot of information, useful for development/testing)
     25# notice (moderately verbose, what you want in production probably)
     26# warning (only very important / critical messages are logged)
     27loglevel debug
     28
     29# Specify the log file name. Also 'stdout' can be used to force
     30# the demon to log on the standard output. Note that if you use standard
     31# output for logging but daemonize, logs will be sent to /dev/null
     32logfile stdout
     33
     34# Set the number of databases. The default database is DB 0, you can select
     35# a different one on a per-connection basis using SELECT <dbid> where
     36# dbid is a number between 0 and 'databases'-1
     37databases 16
     38
     39################################ SNAPSHOTTING  #################################
     40#
    2241# Save the DB on disk:
    2342#
    2443#   save <seconds> <changes>
     
    3453save 300 10
    3554save 60 10000
    3655
     56# Compress string objects using LZF when dump .rdb databases?
     57# For default that's set to 'yes' as it's almost always a win.
     58# If you want to save some CPU in the saving child set it to 'no' but
     59# the dataset will likely be bigger if you have compressible values or keys.
     60rdbcompression yes
     61
    3762# The filename where to dump the DB
    3863dbfilename dump.rdb
    3964
     
    4166# Note that you must specify a directory not a file name.
    4267dir @PREFIX@/var/db/redis
    4368
    44 # Set server verbosity to 'debug'
    45 # it can be one of:
    46 # debug (a lot of information, useful for development/testing)
    47 # notice (moderately verbose, what you want in production probably)
    48 # warning (only very important / critical messages are logged)
    49 loglevel debug
    50 
    51 # Specify the log file name. Also 'stdout' can be used to force
    52 # the demon to log on the standard output. Note that if you use standard
    53 # output for logging but daemonize, logs will be sent to /dev/null
    54 logfile stdout
    55 
    56 # Set the number of databases. The default database is DB 0, you can select
    57 # a different one on a per-connection basis using SELECT <dbid> where
    58 # dbid is a number between 0 and 'databases'-1
    59 databases 16
    60 
    6169################################# REPLICATION #################################
    6270
    6371# Master-Slave replication. Use slaveof to make a Redis instance a copy of
    6472# another Redis server. Note that the configuration is local to the slave
    6573# so for example it is possible to configure the slave to save the DB with a
    6674# different interval, or to listen to another port, and so on.
    67 
     75#
    6876# slaveof <masterip> <masterport>
    6977
     78# If the master is password protected (using the "requirepass" configuration
     79# directive below) it is possible to tell the slave to authenticate before
     80# starting the replication synchronization process, otherwise the master will
     81# refuse the slave request.
     82#
     83# masterauth <master-password>
     84
    7085################################## SECURITY ###################################
    7186
    7287# Require clients to issue AUTH <PASSWORD> before processing any other
     
    7590#
    7691# This should stay commented out for backward compatibility and because most
    7792# people do not need auth (e.g. they run their own servers).
    78 
     93#
    7994# requirepass foobared
    8095
    8196################################### LIMITS ####################################
     
    85100# is able to open. The special value '0' means no limts.
    86101# Once the limit is reached Redis will close all the new connections sending
    87102# an error 'max number of clients reached'.
    88 
     103#
    89104# maxclients 128
    90105
    91106# Don't use more memory than the specified amount of bytes.
     
    104119# it is going to use too much memory in the long run, and you'll have the time
    105120# to upgrade. With maxmemory after the limit is reached you'll start to get
    106121# errors for write operations, and this may even lead to DB inconsistency.
    107 
     122#
    108123# maxmemory <bytes>
    109124
     125############################## APPEND ONLY MODE ###############################
     126
     127# By default Redis asynchronously dumps the dataset on disk. If you can live
     128# with the idea that the latest records will be lost if something like a crash
     129# happens this is the preferred way to run Redis. If instead you care a lot
     130# about your data and don't want to that a single record can get lost you should
     131# enable the append only mode: when this mode is enabled Redis will append
     132# every write operation received in the file appendonly.log. This file will
     133# be read on startup in order to rebuild the full dataset in memory.
     134#
     135# Note that you can have both the async dumps and the append only file if you
     136# like (you have to comment the "save" statements above to disable the dumps).
     137# Still if append only mode is enabled Redis will load the data from the
     138# log file at startup ignoring the dump.rdb file.
     139#
     140# The name of the append only file is "appendonly.log"
     141#
     142# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
     143# log file in background when it gets too big.
     144
     145appendonly no
     146
     147# The fsync() call tells the Operating System to actually write data on disk
     148# instead to wait for more data in the output buffer. Some OS will really flush
     149# data on disk, some other OS will just try to do it ASAP.
     150#
     151# Redis supports three different modes:
     152#
     153# no: don't fsync, just let the OS flush the data when it wants. Faster.
     154# always: fsync after every write to the append only log . Slow, Safest.
     155# everysec: fsync only if one second passed since the last fsync. Compromise.
     156#
     157# The default is "always" that's the safer of the options. It's up to you to
     158# understand if you can relax this to "everysec" that will fsync every second
     159# or to "no" that will let the operating system flush the output buffer when
     160# it want, for better performances (but if you can live with the idea of
     161# some data loss consider the default persistence mode that's snapshotting).
     162
     163appendfsync always
     164# appendfsync everysec
     165# appendfsync no
     166
    110167############################### ADVANCED CONFIG ###############################
    111168
    112169# Glue small output buffers together in order to send small replies in a
     
    129186# in production before of Redis 1.0-stable. Still please try this feature in
    130187# your development environment so that we can test it better.
    131188shareobjects no
    132 # shareobjectspoolsize 1024
     189shareobjectspoolsize 1024