Redis启动时提示:
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.
意思是:你使用的是透明大页,可能导致redis延迟和内存使用问题。执行echo never > /sys/kernel/mm/transparent_hugepage/enabled修复该问题。
临时解决方法:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
永久解决方法:
将其写入/etc/rc.local文件中:
iftest -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
fi
关于透明大页可参考《透明大页》