I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.,transparenthugepage
启动mongodb时提示下方信息
Server has startup warnings: 2015-06-18T17:20:17.944+0800 I CONTROL [initandlisten] 2015-06-18T17:20:17.944+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 2015-06-18T17:20:17.944+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2015-06-18T17:20:17.944+0800 I CONTROL [initandlisten] 2015-06-18T17:20:17.944+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2015-06-18T17:20:17.944+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2015-06-18T17:20:17.944+0800 I CONTROL [initandlisten]
只需打开/etc/init/mongod.conf
文件,将下方的代码添加到chown $DEAMONUSER /var/run/mongodb.pid
和
end script
.之间即可,注意空格的对齐。
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
然后重启mongod服务
deng@deng-Lenovo:~$ sudo service mongod restart mongod stop/waiting mongod start/running, process 26127 deng@deng-Lenovo:~$ mongo MongoDB shell version: 3.0.4 connecting to: test >
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。