Redis Boot Warning Resolved

Source: Internet
Author: User
Tags memory usage redis redis version

[root@centos224]# service REDISD start 21985:m, 04:07:20.376 * Increased maximum number of open files to 10032 (it W
                As originally set to 1024).                                             
      _._                                                  
           _.-``__ ''-._  _.-``    `.  `_.  "-._ Redis 3.2.1 (00000000/0)".-".-".
 ' \ \ _.,_ '-._ (',.-' | ',) Running in standalone mode |`-._`-...-` __...-.``-._|'     ` _.-'|    port:6379 |     `-._   `._    /     _.-'    |                                  
 pid:21985 '-._ '-._ '-./_.-' _.-' | '-._ '-._ '-.__.-' _.-' _.-' |    |           `-._`-._        _.-'_.-'    | Http://redis.io '-._ '-._ '-.__.-' _.-' _.-' | '-._ '-._ '-.__.-' _.                                  
 -'_.-'|    |              `-._`-._        _.-'_.-'    |                    
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                           
              `-._        _.-' '-.__.-' 21985:m 04:07:20.428 # warning:the TCP Backlog setting O
F 511 cannot be enforced because/proc/sys/net/core/somaxconn are set to the lower value of 128. 21985:m 04:07:20.428 # Server started, Redis version 3.2.1 21985:m for 04:07:20.428 # WARNING 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 the "take effect. 
	21985:m 04:07:20.428 # WARNING You has Transparent Huge Pages (THP) support for enabled in your kernel. 
	This would 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 the setting after a reboot.
Redis must be restarted after THP is disabled. 21985:m 04:07:20.442 * DB loaded from disk:0.014 seconds 21985:m in Nov 04:07:20.443 * The server is now ready to
 Accept connections on port 6379


Warning:

Increased maximum number of open files to 10032 (it is originally set to 1024).
Solution:

#查看系统限制
[root@centos224]# ulimit-a

#设置 "open files" number
[root@centos224]# ulimit-n 10032

#或者设置用户限制
[root@centos224]# vi/etc/security/limits.conf


Warning:

Warning:the TCP Backlog setting of 511 cannot be enforced because/proc/sys/net/core/somaxconn are set to the lower value of 128.
Solution:

[root@centos224]# Echo 511 >/proc/sys/net/core/somaxconn
[root@centos224]# echo "net.core.somaxconn = 551" > /etc/sysctl.conf

Warning:

WARNING 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 the "take effect.
Solve:
[root@centos224]# echo 1 >/proc/sys/vm/overcommit_memory
[root@centos224]# echo ' Vm.overcommit_memory=1 ' > >/etc/sysctl.conf


Warning:

WARNING You has Transparent Huge Pages (THP) support for enabled in your kernel. 
	This would 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.
Solve:
[root@centos224]# echo never >/sys/kernel/mm/transparent_hugepage/enabled
[root@centos224]# vi/etc/rc.local
if Test-f/sys/kernel/mm/transparent_hugepage/enabled; then
   echo never >/sys/kernel/mm/transparent_ hugepage/enabled
fi
if test-f/sys/kernel/mm/transparent_hugepage/defrag; then
   echo never >/sys/ Kernel/mm/transparent_hugepage/defrag
fi



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.