Redis启动提示Transparent Huge Pages (THP) support enabled in your kernel.

96
依然饭太稀
2017.04.12 17:34* 字数 179

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

关于透明大页可参考《透明大页

Redis
Web note ad 1