mongoDB 禁用大内存页面 transparent_hugepage=never

mongo warning:

2016-09-05T10:55:13.241+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-09-05T10:55:13.241+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-09-05T10:55:13.241+0800 I CONTROL  [initandlisten] 
2016-09-05T10:55:13.241+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-09-05T10:55:13.241+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'


如果在运行时解决这问题,也不困难,只需要修改hugepage的设置就可以了。执行下面两条命令
echo never >> /sys/kernel/mm/transparent_hugepage/enabled
echo never >> /sys/kernel/mm/transparent_hugepage/defrag
别忘了重启你的mongoDB,这条warning就消失了。不过下次重新启动系统,这些设置就会消失。

你可能感兴趣的:(mongoDB 禁用大内存页面 transparent_hugepage=never)