美文网首页
Redis启动提示Transparent Huge Pages

Redis启动提示Transparent Huge Pages

作者: 依然饭太稀 | 来源:发表于2017-04-12 17:34 被阅读3478次

    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启动提示Transparent Huge Pages

          本文链接:https://www.haomeiwen.com/subject/obgmattx.html