Note
This feature is available starting from the MCP 2019.2.6 maintenance update. Before using the feature, follow the steps described in Apply maintenance updates.
This section instructs you on how to configure the memory rules and limits for the Redis server.
To configure memory limits for the Redis server:
Log in to the Salt Master node.
In classes/cluster/<cluster_name>/openstack/telemetry.yml
, specify the
following parameters as required:
parameters:
redis:
server:
maxmemory: 1073741824 # 1GB
maxmemory-policy: <memory-policy>
maxmemory-samples: 3
Supported values for the memory-policy
parameter include:
volatile-lru
- the service removes the key with expiration time set
using the Least Recently Used (LRU) algorithmallkeys-lru
- the service removes any key according to the LRU
algorithmvolatile-random
- the service removes a random key with an expiration
time setallkeys-random
- the service removes any random keyvolatile-ttl
- the service removes the key with the nearest expiration
time (minor TTL)noeviction
- the service does not remove any key but returns an error
on write operationsApply the changes:
salt -C 'I@redis:server' saltutil.refresh_pillar
salt -C 'I@redis:server' state.apply redis.server