Resources and Best practices on redis setup


Reference on redis configuration in Magento’s local.xml file


Few important links from this Magento doc (link posted above) follow below:

1. Magento Expert Consulting Group (ECG) article about Redis:

2. Redis session config:

3. Redis back end config:

CCB module page

CCB module page in confluence (

Best practices

Configure different <database> and <port> for each use of Redis

Configure different <database> and <port> for each use of Redis (session, fpc and cache) in local.xml (better performance as Redis is not multi thread)

Nevertheless at Vaimo we have so far standardised on only 2 Redis instances primarily, so we can configure the session store differently than the cache backend. In benchmarks we have seen so far, splitting FPC and Cache didn’t make much of a difference, but it might well be worth revisiting with our newer and bigger sites

Compression off for FPC only

Always turn compression off for FPC only (it has its own compression).

Turn persistent off

Always turn persistent off (because of bug with php-fpm)

Use a cronjob to keep Redis size healthy (garbage collection with rediscli.php)

Our Redis servers at Vaimo are configured to automatically expire old values and replace old keys, once a predefined memory limit it hit (limit is set bigger that what’s needed). Because of our server configuration, we have thus always felt that the cronjob is not necessary. Some recent projects have shown however that tag management can push up the latency to Redis, so potentially having fewer keys in those tags, at the expense of a slightly lower cache hit rate, could be beneficial to those projects. What is also potentially interesting is to see the cost of tag operations on empty tags (tags in redis for which all the keys have already expired). So this is all definitely worth investigating. 

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s