分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
好多地方都提示关闭这个,MongoDB 3.0提示
2015-10-21T09:03:24.256+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.2015-10-21T09:03:24.256+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'2015-10-21T09:03:24.256+0800 I CONTROL [initandlisten] 2015-10-21T09:03:24.256+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.2015-10-21T09:03:24.256+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
sponge安装文档要求关闭,mapr也需要关闭,oracle也要求关闭,HDFS会因为这个性能严重受影响。
究竟是何方妖孽?
看看oracle网站如何说:
Starting from RHEL6/OL6, Transparent HugePages are implemented and enabled by default. They are meant to improve memory management by allowing HugePages to be allocated dynamically by the "khugepaged" kernel thread, rather than at boot time like conventional HugePages. That sounds like a good idea, but unfortunately Transparent HugePages don't play well with Oracle databases and are associated with node reboots in RAC installations and performance problems on both single instance and RAC installations. As a result Oracle recommends disabling Transparent HugePages on all servers running Oracle databases, as described in this MOS note.
就是允许hugepage可以动态分配,而不是系统启动时预先分配,看上去对内存消耗很大的服务都不喜欢它。感觉这是一个lazy loading的设计思想。
如何关闭呢。有几种方法,centos上的方法是
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
永久关闭,就将上面的命令写入到/etc/rc.local文件中
ubuntu上的方法是(针对mongodb的需求)
echo never > /sys/kernel/mm/transparent_hugepage/enabledecho 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/enabledfiif test -f /sys/kernel/mm/transparent_hugepage/defrag; then echo never > /sys/kernel/mm/transparent_hugepage/defragfi
注意,各系统可能文件路径(名称)有点区别。
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow