I am looking at various tuning on magento 1.9.3 installation with Redis hosting FPC. I am interested in mileage with the various policies available as listed below and also the associated monitoring strategies for Redis cache items and lifecycles.
I am experiencing periodic failures of my Redis service due to OOM, currently at around 550mb. I am about to move to a much bigger dedicated Redis host, but I am unsure if my problem will just continue due to ever growing cache due to only using the default cache memory policy.
I do not know:
- how to monitor and understand if items are actually being evicted and that the cache is being emptied of stale items
- what practical effect the memory policies will have and what is recommended (if not the default)?
From Redis Docs:
noeviction: return errors when the memory limit was reached and the client is trying to execute commands that could result in more memory to be used (most write commands, but DEL and a few more exceptions).
allkeys-lru: evict keys trying to remove the less recently used (LRU) keys first, in order to make space for the new data added.
volatile-lru: evict keys trying to remove the less recently used (LRU) keys first, but only among keys that have an expire set, in order to make space for the new data added. allkeys-random: evict random keys in order to make space for the new data added.
volatile-random: evict random keys in order to make space for the new data added, but only evict keys with an expire set.
volatile-ttl: In order to make space for the new data, evict only keys with an expire set, and try to evict keys with a shorter time to live (TTL) first.