Estimate Redis memory use from key count, value size and overhead.
Per-key overhead dominates when values are small, so millions of tiny keys cost far more than the data suggests. Replicas hold full copies, so cluster memory multiplies with the replica count. Redis becomes unstable rather than merely slow when it approaches its memory limit, which is why maxmemory should sit around 25 per cent above the working set.
Redis Memory
Memory = keys × (key + value + per-key overhead), plus replica copies
Memory = keys × (key + value + per-key overhead), plus replica copies Per-key overhead dominates when values are small, so millions of tiny keys cost far more than the data suggests. Replicas hold full copies, so cluster memory multiplies with the replica count.
Redis becomes unstable rather than merely slow when it approaches its memory limit, which is why maxmemory should sit around 25 per cent above the working set.
This calculator takes 5 inputs: Number of keys, Average key length, Average value size, Per-key overhead, Replicas. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.