Let’s do some fine tuning for Redis in production

  1. Turn on vm over commit memory. edit the /etc/sysctl.conf file
sudo chmod 664 /etc/sysctl

then use and editor to add to this bottom of the file
vm.overcommit_memory = 1

Without getting into the pros and cons, vm over commit is fully explained here https://redis.io/topics/faq

Next, we setup the system services to start the Redis node(s). It’s common to have at least a master and slave on one server so let’s allow multiple services to run on the same server and have them auto-start. And while we’re at it, let’s make the service start/stop commands work for Redis nodes with AUTH passwords. Oh, and let’s fix the transparent_hugepage default (set it to never, as recommended by Redis.) This is all explained in my last post Redis Linux Service

Also don’t forget to turn off the debug logging used for development.

Advertisements