时间:2021-07-01 10:21:17 帮助过:12人阅读
2018-09-12T05:41:06.390+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is ‘always‘.
2018-09-12T05:41:06.390+0000 I CONTROL [initandlisten] ** We suggest setting it to ‘never‘
就是允许hugepage可以动态分配,而不是系统启动时预先分配,对内存消耗很大的服务都不喜欢它,坑人无数。
这个配置会在多个服务上都是坑 :hdfs 、elasticsearch ,mongodb ,oracle ,推荐默认系统初始化就关掉。
centos上的关闭方法是
echo never > /sys/kernel/mm/transparent_hugepage/enabled
ubuntu:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never> /sys/kernel/mm/transparent_hugepage/defrag
写入文件 :/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
参考信息:https://blog.csdn.net/csfreebird/article/details/49307935
mongodb WARNING:transparent_hugepage/enabled
标签:code 动态 blog ofo 关闭 初始 就是 写入文件 rac