redhat linux 7.4关闭透明大页
每一步:
在GRUB_CMDLINE_LINUX加入选项 transparent_hugepage=never
echo 'GRUB_CMDLINE_LINUX="transparent_hugepage=never"' >> /etc/default/grub
第二步:
重新生成grub配置文件
grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-bdd94cf792bd4ac6a087ff2542ba6cd0 Found initrd image: /boot/initramfs-0-rescue-bdd94cf792bd4ac6a087ff2542ba6cd0.img done
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-bdd94cf792bd4ac6a087ff2542ba6cd0 Found initrd image: /boot/initramfs-0-rescue-bdd94cf792bd4ac6a087ff2542ba6cd0.img done
第三步:
重启操作系统
查看是否生效:
[root@athena2db2 ~]# cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-693.el7.x86_64 root=/dev/mapper/rhel-root ro transparent_hugepage=never [root@athena2db2 ~]# grep Huge /proc/meminfo AnonHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB