summaryrefslogtreecommitdiff
path: root/tests/assets
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-01-09 16:49:52 +0100
committerantirez <antirez@gmail.com>2011-01-09 16:49:52 +0100
commit5e1d2d30f7b96c0aa808f8c6f9b267880c6097ca (patch)
tree63e3060742649415ae8e4872c871c47bb12953f2 /tests/assets
parent67a1810b324c9f140891d4aa5b80133b66cf9a70 (diff)
downloadredis-5e1d2d30f7b96c0aa808f8c6f9b267880c6097ca.tar.gz
initial fix of the test suite to run both in in-memory and diskstore mode
Diffstat (limited to 'tests/assets')
-rw-r--r--tests/assets/default.conf148
1 files changed, 131 insertions, 17 deletions
diff --git a/tests/assets/default.conf b/tests/assets/default.conf
index 042332848..150eb6907 100644
--- a/tests/assets/default.conf
+++ b/tests/assets/default.conf
@@ -18,9 +18,9 @@ daemonize no
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
-pidfile redis.pid
+pidfile /var/run/redis.pid
-# Accept connections on the specified port, default is 6379
+# Accept connections on the specified port, default is 6379.
port 6379
# If you want you can bind a single interface, if the bind option is not
@@ -28,6 +28,12 @@ port 6379
#
# bind 127.0.0.1
+# Specify the path for the unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+# unixsocket /tmp/redis.sock
+
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 300
@@ -44,6 +50,16 @@ loglevel verbose
# output for logging but daemonize, logs will be sent to /dev/null
logfile stdout
+# To enable logging to the system logger, just set 'syslog-enabled' to yes,
+# and optionally update the other syslog parameters to suit your needs.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
@@ -86,7 +102,7 @@ dbfilename dump.rdb
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
-dir /tmp
+dir ./
################################# REPLICATION #################################
@@ -104,6 +120,19 @@ dir /tmp
#
# masterauth <master-password>
+# When a slave lost the connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+# still reply to client requests, possibly with out of data data, or the
+# data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale data is set to 'no' the slave will reply with
+# an error "SYNC with master in progress" to all the kind of commands
+# but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
################################## SECURITY ###################################
# Require clients to issue AUTH <PASSWORD> before processing any other
@@ -119,6 +148,22 @@ dir /tmp
#
# requirepass foobared
+# Command renaming.
+#
+# It is possilbe to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# of hard to guess so that it will be still available for internal-use
+# tools but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possilbe to completely kill a command renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+
################################### LIMITS ####################################
# Set the max number of connected clients at the same time. By default there
@@ -148,6 +193,37 @@ dir /tmp
#
# maxmemory <bytes>
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached? You can select among five behavior:
+#
+# 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
+#
+# Note: with all the kind of policies, Redis will return an error on write
+# operations, when there are not suitable keys for eviction.
+#
+# At the date of writing this commands are: set setnx setex append
+# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+# getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy volatile-lru
+
+# LRU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can select as well the sample
+# size to check. For instance for default Redis will check three keys and
+# pick the one that was used less recently, you can change the sample size
+# using the following configuration directive.
+#
+# maxmemory-samples 3
+
############################## APPEND ONLY MODE ###############################
# By default Redis asynchronously dumps the dataset on disk. If you can live
@@ -195,29 +271,54 @@ appendonly no
appendfsync everysec
# appendfsync no
-################################ VIRTUAL MEMORY ###############################
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving the durability of Redis is
+# the same as "appendfsync none", that in pratical terms means that it is
+# possible to lost up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+no-appendfsync-on-rewrite no
+
+#################################### DISK STORE ###############################
-# Virtual Memory allows Redis to work with datasets bigger than the actual
-# amount of RAM needed to hold the whole dataset in memory.
-# In order to do so very used keys are taken in memory while the other keys
-# are swapped into a swap file, similarly to what operating systems do
-# with memory pages.
+# When disk store is active Redis works as an on-disk database, where memory
+# is only used as a object cache.
+#
+# This mode is good for datasets that are bigger than memory, and in general
+# when you want to trade speed for:
#
-# To enable VM just set 'vm-enabled' to yes, and set the following three
-# VM parameters accordingly to your needs.
+# - less memory used
+# - immediate server restart
+# - per key durability, without need for backgrond savig
+#
+# On the other hand, with disk store enabled MULTI/EXEC are no longer
+# transactional from the point of view of the persistence on disk, that is,
+# Redis transactions will still guarantee that commands are either processed
+# all or nothing, but there is no guarantee that all the keys are flushed
+# on disk in an atomic way.
+#
+# Of course with disk store enabled Redis is not as fast as it is when
+# working with just the memory back end.
-diskstore-enabled yes
+diskstore-enabled no
diskstore-path redis.ds
cache-max-memory 0
cache-flush-delay 0
############################### ADVANCED CONFIG ###############################
-# Glue small output buffers together in order to send small replies in a
-# single TCP packet. Uses a bit more CPU but most of the times it is a win
-# in terms of number of queries per second. Use 'yes' if unsure.
-glueoutputbuf yes
-
# Hashes are encoded in a special way (much more memory efficient) when they
# have at max a given numer of elements, and the biggest element does not
# exceed a given threshold. You can configure this limits with the following
@@ -225,6 +326,19 @@ glueoutputbuf yes
hash-max-zipmap-entries 64
hash-max-zipmap-value 512
+# Similarly to hashes, small lists are also encoded in a special way in order
+# to save a lot of space. The special representation is only used when
+# you are under the following limits:
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happens to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
# order to help rehashing the main Redis hash table (the one mapping top-level
# keys to values). The hash table implementation redis uses (see dict.c)