解决 MongoDB 一些的警告信息
MongoDB 一些比较烦人的警告信息
比如 /sys/kernel/mm/transparent_hugepage/defrag is 'always' :
CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
CONTROL [initandlisten] ** We suggest setting it to 'never'
CONTROL [initandlisten]
解决 :
sudo apt install sysfsutils
echo "kernel/mm/transparent_hugepage/enabled = never" >> /etc/sysfs.conf
echo "kernel/mm/transparent_hugepage/defrag = never" >> /etc/sysfs.conf
/etc/init.d/sysfsutils restart