Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
3243252c
Commit
3243252c
authored
Nov 18, 2019
by
antirez
Browse files
Expire cycle: document expire effort in redis.conf.
parent
e8ceba4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.conf
View file @
3243252c
...
@@ -813,11 +813,11 @@ replica-priority 100
...
@@ -813,11 +813,11 @@ replica-priority 100
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
# is reached. You can select among five behaviors:
# is reached. You can select among five behaviors:
#
#
# volatile-lru -> Evict using approximated LRU
among the
keys with an expire set.
# volatile-lru -> Evict using approximated LRU
, only
keys with an expire set.
# allkeys-lru -> Evict any key using approximated LRU.
# allkeys-lru -> Evict any key using approximated LRU.
# volatile-lfu -> Evict using approximated LFU
among the
keys with an expire set.
# volatile-lfu -> Evict using approximated LFU
, only
keys with an expire set.
# allkeys-lfu -> Evict any key using approximated LFU.
# allkeys-lfu -> Evict any key using approximated LFU.
# volatile-random -> Remove a random key
among the ones with
an expire set.
# volatile-random -> Remove a random key
having
an expire set.
# allkeys-random -> Remove a random key, any key.
# allkeys-random -> Remove a random key, any key.
# volatile-ttl -> Remove the key with the nearest expire time (minor TTL)
# volatile-ttl -> Remove the key with the nearest expire time (minor TTL)
# noeviction -> Don't evict anything, just return an error on write operations.
# noeviction -> Don't evict anything, just return an error on write operations.
...
@@ -872,6 +872,23 @@ replica-priority 100
...
@@ -872,6 +872,23 @@ replica-priority 100
#
#
# replica-ignore-maxmemory yes
# replica-ignore-maxmemory yes
# Redis reclaims expired keys in two ways: upon access when those keys are
# found to be expired, and also in background, in what is called the
# "active expire key". The key space is slowly and interactively scanned
# looking for expired keys to reclaim, so that it is possible to free memory
# of keys that are expired and will never be accessed again in a short time.
#
# The default effort of the expire cycle will try to avoid having more than
# ten percent of expired keys still in memory, and will try to avoid consuming
# more than 25% of total memory and to add latency to the system. However
# it is possible to increase the expire "effort" that is normally set to
# "1", to a greater value, up to the value "10". At its maximum value the
# system will use more CPU, longer cycles (and technically may introduce
# more latency), and will tollerate less already expired keys still present
# in the system. It's a tradeoff betweeen memory, CPU and latecy.
#
# active-expire-effort 1
############################# LAZY FREEING ####################################
############################# LAZY FREEING ####################################
# Redis has two primitives to delete keys. One is called DEL and is a blocking
# Redis has two primitives to delete keys. One is called DEL and is a blocking
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment