21155:M 15 Nov 2019 23:25:18.021 # 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.
翻译为:【21155:M 2019年11月15日23:25:18.021警告您的内核中启用了透明大页面(THP)支持。这将导致Redis的延迟和内存使用问题。要解决此问题,请以root用户身份运行命令“echo never>/sys/kernel/mm/transparent_hugepage/enabled”,并将其添加到/etc/rc.local中,以便在重新启动后保留设置。禁用THP后,必须重新启动Redis】
解决:
vi /etc/rc.local
添加代码:
if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
fi
或者
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled