linux redis启动报错WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This wi
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/kerne
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)支持。这将创建与redis的延迟和内存使用问题。若要修复此问题,请以root身份运行命令“echo never > /sys/kernel/mm/transparent_hugepage/enabled”,并将其添加到您的/etc/rc.local,以便在重新启动后保留设置。在禁用THP之后,必须重新启动redis。
解决办法:
先关闭redis,关于如何关闭redis并重启redis请参考我本篇文章:
https://blog.csdn.net/changyana/article/details/123289897
然后输入如下命令
sudo vim /etc/rc.local
然后按键盘上的a
键进入编辑模式,之后在最后输入如下代码
echo never > /sys/kernel/mm/transparent_hugepage/enabled
然后按esc
键,输入:wq
表示退出并保存。
之后重启redis就不会有WARNING了!
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)