在RedHat 7中关闭transparent_hugepage
从rhel 6.2开始支持transparnt_hugepage,但是对于数据库类应用需要关闭transparent_hugepate,
比如mongodb或oracle都需要关闭.
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root crashkernel=auto rd.lvm.lv=rhel/swap vconsole.font=latarcyrheb-sun16
vconsole.keymap=us rhgb quiet transparent_hugepage=never"
重启竟然没有禁止掉
[mongo@localhost transparent_hugepage]$ cat enabled
[always] madvise never
[mongo@localhost transparent_hugepage]$ ps -eaf | grep khugepaged
root 1355 2 0 20:59 ? 00:00:00 [khugepaged]
mongo 2455 2294 0 21:03 pts/1 00:00:00 grep --color=auto khugepaged
重新编译grub2,再次启动
[root@localhost transparent_hugepage]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-c183df792ee5451eb179923e81209e30
Found initrd image: /boot/initramfs-0-rescue-c183df792ee5451eb179923e81209e30.img
done
[root@localhost transparent_hugepage]# systemctl disable tuned
总算禁止了transparent_hugepate
[root@localhost transparent_hugepage]# cat enabled
always madvise [never]