MySQL乱弹笔记

【Linux基础】CentOS7 关闭透明大页

2020-11-04  本文已影响0人  醉红尘丶

查看

[root@localhost ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

禁用

修改 /etc/redhat-release

添加 transparent_hugepage=never

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto spectre_v2=retpoline rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"
image.png

执行生效

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1127.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1127.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-d30eeac8465546d9b0c23cf88b81c165
Found initrd image: /boot/initramfs-0-rescue-d30eeac8465546d9b0c23cf88b81c165.img
done

重启

修改完成后重启服务器,再次查看

[root@localhost ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
上一篇 下一篇

猜你喜欢

热点阅读