3

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?

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

3 Answers 3

6

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.

1
  • The best answer comes from experience.
    – madagaskar
    Commented Apr 5 at 13:42
1
  • 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
  • 2
    And this is an idea based on what?
    – KrzysDan
    Commented Mar 5, 2018 at 11:25
  • I have give this idea basis of my experience over use of redis at magento
    – Amit Bera
    Commented Mar 5, 2018 at 12:23
0

@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

1

Your Answer

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

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