2

I've recently come across redis being installed and configured on single server low traffic stores.

Generally the default response for anyone when reporting their Magento 2 store is slow (which is everyone) is for the web hosts to install and configure redis (among other things). However so far it is my personal opinion that having redis adds an additional barrier when trying to load new content and I see very little performance gain.

Knowing a bit about the technology and how it works it is my understanding is that with a webserver using ssd's with low traffic the benefit is minimal. I'm wondering if anyone in the community has some benchmarks on low traffic stores with a before and after to confirm my theory.

I do however understand how redis has a positive impact on high traffic stores.

I'm keen to hear other's experiences. I see questions on configuring redis but I don't seen that anyone has asked this question on magento 2.

0

So through lack of answers from anyone else in the community I went ahead and created a test scenario.

  • Magento 2.4.2
  • Sample data installed
  • Installed primitive cache warmer I created https://github.com/DominicWatts/CacheWarmer - after a lot of deliberation went with purely page hits on the frontend
  • All Magento caches on
  • Index on save (although irrelevant in my test scenario)
  • Test site - no external traffic
  • CSS merging / JS merging / html minify all off
  • No proxy cache (varnish etc.)

I created three stacks.

  • No redis
  • Redis but not in use
  • Redis and configured and in use

All use the same technology.

  • MariaDB 10.4
  • nginx 1.17
  • php 7.3 (7.3.19 - Zend OPcache v7.3.19)
  • elasticsearch 7.6
  • SSD

No cron

At the start of each run I cleared cache and ran the process three times

For my test case I used redis 5.0

Admittedly I don't have a great deal of redis knowledge and therefore I stuck with default configuration.

No redis

  • 1st run : 106503 ms
  • 2nd run : 19419 ms
  • 3rd run : 19381 ms

Redis but not in use

  • 1st run : 100937 ms
  • 2nd run : 19393 ms
  • 3rd run : 19475 ms

Redis and configured and in use

  • 1st run : 109056 ms
  • 2nd run : 21164 ms
  • 3rd run : 20969 ms

Conclusion

The biggest improvement can be seen through having a warm cache - that is no doubt. However having redis installed actually caused a slightly degraded performance. And my conclusion is that using redis on a low traffic store can actually take resource away from the stack.

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.