I want to move the Magento cache to Redis.

How much RAM memory is needed for Redis to support this scenario?. I assert no SWAP usage. Somehow I cannot find any recommendations in the documentation.

Does that depend much on the number of products? If so do you know how much I need for 1000 products, 100k products, and 1M products?

  • I think you need minimum 8GB RAM.
    – user53816
    Mar 5, 2018 at 9:29

3 Answers 3


18 month later I know the answer to this question based on own experience (and 20+ shops online). We use 2 Redis instances - for sessions and for cache (not full page cache). The reason for that is to avoid session evictions because of the growth of cache data.

For sessions, we assign 100M and no evictions policy and this was never a problem even with long-lasting sessions.

For cache in most cases, 300M is enough for rather small shops to 800M for 15k products. We have one shop with 2M of products and for this shop max memory for Redis is set to 1400M end eviction policy to allkeys-lru. This shop is working stable for more than 2 years. We never spotted a problem with allkeys-lru eviction policy.

  • For 1000 products ,you need 2GB RAM

  • For 100K products ,you need 8GB RAM

  • For 1M products ,you need 32GB RAM

This is an idea and not sure 100% corrent.

  • 2
    And this is an idea based on what?
    – KrzysDan
    Mar 5, 2018 at 11:25
  • I have give this idea basis of my experience over use of redis at magento
    – Amit Bera
    Mar 5, 2018 at 12:23

@KrzysDan where do you set the maxmemory for sessions vs cache, is it in redis.conf file or app/etc/env.php. Do you have an example? Thank you


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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