首页 / REDIS / redis-server的三个警告
redis-server的三个警告
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了redis-server的三个警告,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1424字,纯文字阅读大概需要3分钟。
内容图文
![redis-server的三个警告](/upload/InfoBanner/zyjiaocheng/895/a19378e551624b5b8f555821d2f8d587.jpg)
就这三个警告:
第一个警告:The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
第二个警告:overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to/etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
第三个警告:you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix thisissue 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 thesetting after a reboot. Redis must be restarted after THP is disabled.
解决方案
考虑到redis一般都是部署在服务器上作为服务存在的。所以,本文的解决方案都是持久性配置,不是临时配置。
第一个警告,第二个警告:
将net.core.somaxconn = 1024 和 vm.overcommit_memory = 1 添加到 /etc/sysctl.conf 中,然后执行sysctl -p生效配置。
[root@localhost ~]# vi /etc/sysctl.conf
如图,注意前面没有#号!
保存退出,再执行
[root@localhost ~]# sysctl -p
第三个警告
将echo never > /sys/kernel/mm/transparent_hugepage/enabled 添加到 /etc/rc.local 中,然后执行source /etc/rc.local 生效配置。
[root@localhost ~]# vi /etc/rc.local
注意前面没有#号
保存退出,再执行
[root@localhost ~]# source /etc/rc.local
好了,这时候再去执行 redis-server 就不会有警告提示了。
内容总结
以上是互联网集市为您收集整理的redis-server的三个警告全部内容,希望文章能够帮你解决redis-server的三个警告所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。