Transparent Huge Pages (THP) support enabled WARNING


#1

Hello,
I was reviewing my logs today. I found the following that is a bit over my head. I am hoping someone can help me to resolve. I just upgraded ubuntu packages. Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)

Thanks,

1:M 12 Jan 2019 20:07:56.064 # 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.
1:M 12 Jan 2019 20:07:56.064 * Ready to accept connections
1:signal-handler (1547323804) Received SIGTERM scheduling shutdown…
1:M 12 Jan 2019 20:10:04.047 # User requested shutdown…
1:M 12 Jan 2019 20:10:04.066 # Redis is now ready to exit, bye bye…
1:C 12 Jan 2019 20:10:57.486 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 12 Jan 2019 20:10:57.487 # Redis version=5.0.1, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 12 Jan 2019 20:10:57.487 # Configuration loaded
1:M 12 Jan 2019 20:10:57.489 * Running mode=standalone, port=6379.
1:M 12 Jan 2019 20:10:57.489 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 12 Jan 2019 20:10:57.489 # Server initialized
1:M 12 Jan 2019 20:10:57.489 # 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.overcommit_memory=1’ for this to take effect.


#2

Here you go,


#3

Thanks very much. Tutorial addressed my issue perfectly.