summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-02-08 00:17:27 +0100
committerantirez <antirez@gmail.com>2012-02-15 15:26:19 +0100
commit662f25e8053bb111b21000d813da34f3eb333df7 (patch)
treeae0e2e5cd6e2689e5e562da3d7917b2a3b7a218c
parentf27d38862df1acecb7681d21b007affaf78534d6 (diff)
downloadredis-662f25e8053bb111b21000d813da34f3eb333df7.tar.gz
redis.conf updated with new maxmemory semantics
-rw-r--r--redis.conf32
1 files changed, 17 insertions, 15 deletions
diff --git a/redis.conf b/redis.conf
index 44fb536c7..2e434000d 100644
--- a/redis.conf
+++ b/redis.conf
@@ -192,21 +192,23 @@ slave-serve-stale-data yes
# maxclients 128
# Don't use more memory than the specified amount of bytes.
-# When the memory limit is reached Redis will try to remove keys with an
-# EXPIRE set. It will try to start freeing keys that are going to expire
-# in little time and preserve keys with a longer time to live.
-# Redis will also try to remove objects from free lists if possible.
-#
-# If all this fails, Redis will start to reply with errors to commands
-# that will use more memory, like SET, LPUSH, and so on, and will continue
-# to reply to most read-only commands like GET.
-#
-# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a
-# 'state' server or cache, not as a real DB. When Redis is used as a real
-# database the memory usage will grow over the weeks, it will be obvious if
-# it is going to use too much memory in the long run, and you'll have the time
-# to upgrade. With maxmemory after the limit is reached you'll start to get
-# errors for write operations, and this may even lead to DB inconsistency.
+# When the memory limit is reached Redis will try to remove keys
+# accordingly to the eviction policy selected (see maxmemmory-policy).
+#
+# If Redis can't remove keys according to the policy, or if the policy is
+# set to 'noeviction', Redis will start to reply with errors to commands
+# that would use more memory, like SET, LPUSH, and so on, and will continue
+# to reply to read-only commands like GET.
+#
+# This option is usually useful when using Redis as an LRU cache, or to set
+# an hard memory limit for an instance (using the 'noeviction' policy).
+#
+# WARNING: If you have slaves attached to an instance with maxmemory on,
+# the size of the output buffers needed to feed the slaves are subtracted
+# from the used memory count, so that network problems / resyncs will
+# not trigger a loop where keys are evicted, and in turn the output
+# buffer of slaves is full with DELs of keys evicted triggering the deletion
+# of more keys, and so forth until the database is completely emptied.
#
# maxmemory <bytes>