hbhe0316
作者hbhe0316·2021-11-25 22:18
数据库管理员·IBM

redhat 7.7关闭透明大页

字数 1196阅读 701评论 0赞 0

1.在GRUB_CMDLINE_LINUX加入选项 transparent_hugepage=never

echo 'GRUB_CMDLINE_LINUX="transparent_hugepage=never"' >>  /etc/default/grub

2.重新生成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

3.重启操作系统

reboot

4.验证是否关闭透明大页

# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-693.el7.x86_64 root=/dev/mapper/rhel-root ro transparent_hugepage=never
#grep Huge /proc/meminfo
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广