If you do not make any changes to the Linux kernel before booting, the Redis launch warns you of a total of three: The following figure shows
First Warning: The TCP backlog setting of 511 cannot be enforced because/proc/sys/net/core/somaxconn are set to the lower value of 128.
This means: TCP backlog Set the value, 511 did not succeed, because/proc/sys/net/core/somaxconn this set is smaller 128.
Temporary workaround: (that is, you need to modify this value the next time you start)
Echo 511 >/proc/sys/net/core/somaxconn
Persistent Workaround: (that is, you will need to modify this value later)
Write it to the/etc/rc.local file.
The Baklog parameter actually controls the size of the accept queue that has been successfully shook for 3 times.
Refer to Linux in the backlog detailed
Second warning: overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ' vm.overcommit_memory = 1 ' to/etc/sysctl.conf and then reboot or run the command ' Sysctl Vm.overcomm It_memory=1 ' for this to take effect.
This means: The Overcommit_memory parameter is set to 0. In the case of low memory, daemon save may fail. It is recommended that overcommit_memory be modified to 1 in file/etc/sysctl.conf.
Interim workaround: Echo "Vm.overcommit_memory=1" >/etc/sysctl.conf
Permanent workaround: Write it to the/etc/sysctl.conf file.
Reference: Questions about Redis overcommit_memory under Linux
A third warning: you have transparent Huge Pages (THP) support is enabled in your kernel. This would create latency and memory usage issues with Redis. To fix thisissue run the command ' echo never >/sys/kernel/mm/transparent_hugepage/enabled ' as root, and add it to your /etc/rc.local in the order of retain thesetting after a reboot. Redis must be restarted the THP is disabled.
You are using a large transparent page that may cause redis latency and memory usage issues. Perform echo never >/sys/kernel/mm/transparent_hugepage/enabled to fix the problem.
Temporary workaround:
echo Never >/sys/kernel/mm/transparent_hugepage/enabled.
Permanent Solution:
Write it to the/etc/rc.local file.
Reference transparent large page introduction.