Configure memory limits for the Redis server

Configure memory limits for the Redis serverΒΆ


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:

  1. Log in to the Salt Master node.

  2. In classes/cluster/<cluster_name>/openstack/telemetry.yml, specify the following parameters as required:

          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) algorithm
    • allkeys-lru - the service removes any key according to the LRU algorithm
    • volatile-random - the service removes a random key with an expiration time set
    • allkeys-random - the service removes any random key
    • volatile-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 operations
  3. Apply the changes:

    salt -C 'I@redis:server' saltutil.refresh_pillar
    salt -C 'I@redis:server' state.apply redis.server