mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +00:00
feat(redis): allow configuring max allowed memory
This commit is contained in:
parent
6f639e34dc
commit
dd5d9a4ee4
2 changed files with 9 additions and 2 deletions
|
@ -11,6 +11,9 @@ redis_secret: ~
|
|||
redis_config_bind_ip: "0.0.0.0"
|
||||
redis_config_unix_socket_path: ~
|
||||
redis_config_unix_socket_perm: 775
|
||||
redis_config_max_memory_mb: ~
|
||||
redis_config_max_memory_policy: ~ # allkeys-lru
|
||||
|
||||
# Overwrite per-instance to be able to run many instances on the same host
|
||||
# prefix should be sth like 'matrix_', modifies mapped directories, container name and uer
|
||||
redis_prefix: ""
|
||||
|
|
|
@ -860,7 +860,9 @@ requirepass {{ redis_secret }}
|
|||
# limit for maxmemory so that there is some free RAM on the system for replica
|
||||
# output buffers (but this is not needed if the policy is 'noeviction').
|
||||
#
|
||||
# maxmemory <bytes>
|
||||
{% if redis_config_max_memory_mb %}
|
||||
maxmemory {{ redis_config_max_memory_mb }}M
|
||||
{% endif %}
|
||||
|
||||
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
||||
# is reached. You can select one from the following behaviors:
|
||||
|
@ -891,7 +893,9 @@ requirepass {{ redis_secret }}
|
|||
#
|
||||
# The default is:
|
||||
#
|
||||
# maxmemory-policy noeviction
|
||||
{% if redis_config_max_memory_policy %}
|
||||
maxmemory-policy {{ redis_config_max_memory_policy }}
|
||||
{% endif %}
|
||||
|
||||
# LRU, LFU and minimal TTL algorithms are not precise algorithms but approximated
|
||||
# algorithms (in order to save memory), so you can tune it for speed or
|
||||
|
|
Loading…
Reference in a new issue