MongoDB 3.2.5安装过程详细记录(5)

2016-10-19T12:12:59.097+0800 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 2048 processes, 8192 files. Number of processes should be at least 4096 : 0.5 times number of files.

处理方式,根据提示,将 processes  值,由现在的 2048,修改为4096,甚至更高的值。

ps -ef|grep mongod

cat /proc/32321/limits

cat /etc/security/limits.d/90-nproc.conf

vim /etc/security/limits.d/90-nproc.conf

该步骤实际操作过程如下:

[root@linuxidc limits.d]#
[root@linuxidc limits.d]# cat /etc/security/limits.d/90-nproc.conf
# 20160621 limit??
#*              soft    nproc          51200
#*              hard    nproc          51200
*              soft    nproc          2048
*              hard

nproc          16384
*              soft    nofile          8192
*              hard    nofile          8192
*              soft    stack          8192
*              hard    stack          8192
*              soft    memlock        unlimited
*              hard    memlock        unlimited
[root@linuxidc limits.d]# vim /etc/security/limits.d/90-nproc.conf
# 20160621
#*              soft    nproc          51200
#*              hard    nproc          51200
*              soft    nproc          8192
*              hard    nproc          16384
[root@linuxidc ~]#
[root@linuxidc ~]# ulimt -a
-bash: ulimt: command not found
[root@linuxidc ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size          (kbytes, -d) unlimited
scheduling priority            (-e) 0
file size              (blocks, -f) unlimited
pending signals                (-i) 30422
max locked memory      (kbytes, -l) unlimited
max memory size        (kbytes, -m) unlimited
open files                      (-n) 8192
pipe size            (512 bytes, -p) 8
POSIX message queues    (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time              (seconds, -t) unlimited
max user processes              (-u) 8192
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

警告2:

2016-10-19T12:12:59.097+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.

2016-10-19T12:12:59.097+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

2016-10-19T12:12:59.097+0800 I CONTROL  [initandlisten]

2016-10-19T12:12:59.097+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.

2016-10-19T12:12:59.097+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

确认:

cat /sys/kernel/mm/transparent_hugepage/enabled

cat /sys/kernel/mm/transparent_hugepage/defrag

处理:

echo "never" > /sys/kernel/mm/transparent_hugepage/enabled

echo "never" >  /sys/kernel/mm/transparent_hugepage/defrag

该步骤,实际操作过程如下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/837f8e0606de11eff08e167001205cb5.html