Redis Max Memmory and Autostart


#1

Hey Guys,

So, I have shifted all my sites to Redis cache and after some initial issues now it is working perfectly but I have 2 small Issues.

  1. Redis is using 100% of my 512MB ram. I know that there is the max-memory setting for Redis but i don’t know how much max-memory should I allocate to Redis. I am running few wordpress sites with less than thousand pageviews (Combined all sites).

  2. Redis do not start automatically after re starting the server until i give redis-server command. so sites remain down till then. Any way to make it start at boot.

Thanks,


#2

Hello @singhashwin27,

with only 512MB RAM available (it’s the minimum to run Nginx + php-fpm + MySQL but not enough to use in-memory caching system), I can only recommend you to use a lighter cache system (fastcgi is probably the lightest) and to stop and disable redis & memcached services.

To start/stop redis on boot, just use :

# to enable redis on boot
systemctl enable redis-server

# to disable it
systemctl disable redis-server

#3

Thank You, Will switch to FastCGI.


#4

Fastcgi for pagecache

redis for object cache.
why we need to stop redis.

is better to install caching for plugin for 2nd layer of caching.

i guess 1st fastcgi then miss plugin cached static file if not then dynamic page.

the plugin cached 250 pages.

what if modify one post of them. is it wipe all the pages or a single page >> wp rocket.

i am obsessed with google page speed, load under 2-3 seconds… google analytics showing 8 seconds


#5

–wpredis is a full page cache solution with redis, and --wpfc is a full page cache solution with fastcgi.
The main difference is fastcgi do not require extra RAM to store pages in cache.

When you update a post, nginx-helper will only purge cache for a single page + the homepage depending on your settings.