【原创】解决Redis启动报错:Transparent Huge Pages (THP) support enabled in your kernel

blogdaren 2018-07-20 抢沙发 180人次

问题背景

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

问题原因

内核启用THP可能会导致内存使用问题

解决方案

将如下代码追加到 /etc/rc.local 文件中:

if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then
   echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
fi


版权声明:除非注明,本文由( blogdaren )原创,转载请保留文章出处。

本文链接:【原创】解决Redis启动报错:Transparent Huge Pages (THP) support enabled in your kernel

发表评论:

您的昵称:
电子邮件:
个人主页: