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'
查了一下,好像对内存消耗很大的服务都不喜欢它。
我们有几种方法可以关闭,可以这样:
1 2
echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never> /sys/kernel/mm/transparent_hugepage/defrag
还可以永久关闭它,修改/etc/rc.local:
1 2 3 4 5 6 7
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
还有一个问题一直不知道怎么解决,就是
1
2017-11-19T17:13:57.343+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 7857 processes, 65535 files. Number of processes should be at least 32767.5 : 0.5 times number of files.