Lazyfree-lazy-eviction configured with allkeys-lru policy
29K reputation · 30 Apr 2025, 05:53 UTC
When using Redis with the lazyfree-lazy-eviction option enabled, the server attempts to evict keys asynchronously to reduce latency spikes during memory pressure. The interaction of this setting with the allkeys-lru eviction policy is not fully documented, leaving administrators unsure whether asynchronous eviction provides the same latency guarantees as the synchronous LRU eviction that occurs when lazyfree-lazy-eviction is disabled.
The goal is to understand if enabling lazyfree-lazy-eviction under allkeys-lru still ensures that eviction decisions are made off the main thread without blocking command processing, and whether any edge cases could cause delayed reclamation or temporary memory growth under heavy write loads.
Specifically:
- Does
lazyfree-lazy-evictionguarantee that eviction of LRU‑selected keys happens asynchronously when the policy isallkeys-lru? - Are there any workload patterns (e.g., high‑frequency updates with short TTLs) where async eviction under
allkeys-lrucould still produce latency spikes? - Which Redis versions first document or guarantee this behavior?
1 answer
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.