Redis high memory and eviction
High used_memory alone is not always an emergency — sustained evicted_keys with rising latency and falling hit rate is. That eviction thrashing pattern is one of the most common reasons production Redis “gets slow” under load.
Redis memory full: signals that matter
used_memory vs maxmemory — how close you are to the ceiling (and whether policy is noeviction vs allkeys-*/volatile-*).
evicted_keys rate — healthy cache turnover vs thrashing. Sample twice; the delta matters more than the absolute counter.
keyspace hits vs misses — when misses rise with evictions, the app is rewriting what just got evicted.
mem_fragmentation_ratio — RSS vs dataset; very high fragmentation or swap-like ratios need a different fix than “add more keys.”
rejected_connections / OOM errors under noeviction mean the ceiling is real — writers are failing, not just thrashing.
Why eviction raises Redis latency
Eviction runs on the command path. Under write load near maxmemory, Redis spends CPU choosing victims instead of serving GETs.
On ElastiCache / managed Redis, watch Evictions alongside EngineCPUUtilization and CacheHitRate — the same story shows up in CloudWatch.
Missing TTLs and big keys are the usual reasons memory only goes up until the spiral starts.
If you “fix” thrashing by raising maxmemory without fixing TTLs or key shape, you usually buy time — then hit the same wall larger.
maxmemory policy quick guide
allkeys-lru / allkeys-lfu — typical for pure caches: any key can be evicted when full.
volatile-lru / volatile-ttl / volatile-lfu — only keys with an expiry are candidates. Keys without TTL behave like permanent data.
noeviction — writes that need memory fail when full. Latency may look fine until apps start erroring.
Pick policy for the data model, then enforce TTLs (or split cache vs durable stores) so the policy can actually work.
How Baltan helps without dumping the dataset
Findings explain meaning and what to check next — not a raw INFO paste.
Correlated views connect memory pressure to latency and expensive commands when they move together.
The agent never opens Redis to Baltan’s cloud; it pushes sanitized metrics out over HTTPS.
FAQ
When is Redis high memory an emergency?
When you are near maxmemory and seeing rising eviction rate, falling hit rate, write errors, or climbing latency together. Steady high memory with stable hits and no thrash can be normal for a warm cache.
Why is CacheHitRate falling while Evictions rise?
Often the app is re-writing keys that were just evicted — thrashing. Fix TTL lifetimes, key cardinality, or maxmemory/policy before adding more write load.
Does Baltan read my Redis values to explain memory?
No. The agent samples metrics and key names/sizes only. Values and AUTH stay in your network.