1

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:

  1. how to monitor and understand if items are actually being evicted and that the cache is being emptied of stale items
  2. 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.

1

Kindly find below URL for using Redis cache with magento.

URL :http://inchoo.net/magento/using-redis-cache-backend-and-session-storage-in-magento/

  • I think this a a generic setup guide (albeit a good one) but does not consider the ongoing cache management and policies with Redis itself - which is what I am looking for mage specific guidance on. i.e. How should you set up the Redis policy to best suit the mage key lifecycle? The only point of note that I will explore is the Magento cache cleanup script mentioned which I was not aware of. – Ryan Shuttleworth Feb 28 '17 at 9:59
  • This is the best answer in general, although an exploration of the redis policies w.r.t to the magento lifecycle would be useful. But that's maybe just my OCD shining through as noone else seems that bothered! :) Marked as answered – Ryan Shuttleworth Mar 5 '17 at 8:59
0

I think the best option for page caching would be allkeys-lru. Although if you are using Redis 4, you might consider allkeys-lfu (Least Frequently Used).

LRU Cache article from Redis - https://redis.io/topics/lru-cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.