pothi / wp-in-a-box

WordPress in a (LEMP) box (Debian & Ubuntu)!
https://www.tinywp.in/wp-in-a-box/
GNU General Public License v2.0
65 stars 11 forks source link

Optimize the default Redis cache settings! #51

Closed pothi closed 6 years ago

pothi commented 7 years ago

The default can cause issues at large sites.

Just follow the guidelines provided by the redis log regarding the following...

And then modify the following according to the available memory...

maxmemory maxmemory-policy

pothi commented 6 years ago

vm.overcommit_memory and net.core.somaxconn should go in a separate file like swap. For example, you may use /etc/sysctl.d/60-redis-local.conf .

pothi commented 6 years ago

Directly from redis log...

WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.