redis / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[NEW] maxmemory as a percentage

pznamensky opened this issue · comments

The problem/use-case that the feature addresses
We have several Redis servers instances on servers with different available RAM.
Sometimes scale them up or down. Each time amount of RAM changes, we have to tune maxmemory as well.
It would be more convenient to set this value based on the percentage of available RAM.

Description of the feature
It might be helpful to add maxmemory-percent or similar with the value in percentage out of available RAM (without swap if exists) which will be used as maxmemory

Alternatives you've considered
Use IaC tools, cloud-init, PreStart commands to calculate maxmemory.
It's not very straightforward and very convenient though.