How to disable transparent Hugepage (THP) on Red Hat Enterprise Linux 8?
環境
- Red Hat Enterprise Linux 8
- Transparent HugePage (THP)
問題
- How to disable transparent Hugepage (THP) on Red Hat Enterprise Linux 8?
決議
- The transparent hugepage (THP) can be disabled by booting the system with the kernel boot parameter
transparent_hugepage=never
.
Command Line: The
grub2-editenv
command can be used to set the kernel parameter
transparent_hugepage=never
at the end of
kernelopts
in the file
/boot/grub2/grubenv
.
- Get the current kernel command line parameters.
# grub2-editenv - list | grep kernelopts kernelopts=root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap
- Set the kernel parameter
transparent_hugepage=never
by using thegrub2-editenv
command.
# grub2-editenv - set "kernelopts=root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap transparent_hugepage=never"
- Verify the changes.
# grub2-editenv - list | grep kernelopts kernelopts=root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap transparent_hugepage=never
- Reboot the system for changes to take effect.
# reboot
- Check the following files to confirm that the transparent hugepage (THP) is disabled.
# cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] # grep AnonHugePages: /proc/meminfo AnonHugePages: 0 kB # grep nr_anon_transparent_hugepages /proc/vmstat nr_anon_transparent_hugepages 0
Configuration File: The kernel boot parameter
transparent_hugepage=never
can be directly set at the end of
kernelopts
in the file
/boot/grub2/grubenv
.
- Edit file
/boot/grub2/grubenv
and set the kernel boot parametertransparent_hugepage=never
at the end ofkernelopts
.
Eg:
# cat /boot/grub2/grubenv # GRUB Environment Block saved_entry=d956a05b4c9341b9a364b20b801afc12-4.18.0-64.el8.x86_64 boot_success=0 boot_indeterminate=0 kernelopts=root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap transparent_hugepage=never
- Reboot the system for changes to take effect.
# reboot
- Check the following files to confirm that the transparent hugepage (THP) is disabled.
# cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] # grep AnonHugePages: /proc/meminfo AnonHugePages: 0 kB # grep nr_anon_transparent_hugepages /proc/vmstat nr_anon_transparent_hugepages 0
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31439444/viewspace-2674003/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7Linux
- Red Hat Enterprise LinuxLinux
- 從 Red Hat Enterprise Linux 2.1 AS升級到 Red Hat Enterprise Linux 3Linux
- Red Hat Enterprise Linux 7.4Linux
- How to configure password openldap server in Red Hat Enterprise Linux 5?LDAServerLinux
- Red Hat Enterprise Linux Server 7.4 安裝LinuxServer
- Red Hat Enterprise Linux 9的簡介Linux
- Red Hat Enterprise Linux 7的新功能Linux
- Red Hat Enterprise Linux使用資源的限制Linux
- Red Hat Enterprise Linux AS4-U3硬碟Linux硬碟
- Red Hat Enterprise Linux 6官方中文文件Linux
- Red Hat Enterprise Linux 5產品線終結Linux
- asm 包下載地址 Red Hat Enterprise Linux5ASMLinux
- Red Hat Enterprise Linux Server release 6.2配置被動yumLinuxServer
- Grid Control Installation On Red Hat Enterprise LinuxLinux
- Migrating Red Hat Linux 2.1 or 3.0 to Red Hat Linux 4.0Linux
- Red Hat Enterprise Linux 10 下載 - 紅帽企業 LinuxLinux
- 《Red Hat Enterprise Linux 9 系統管理實戰》簡介Linux
- Oracle9i (9.2.0.4.0) Installation on Red Hat Enterprise Linux 5OracleLinux
- Red Hat Enterprise Linux AS 5.3 下配置裸裝置(raw device)Linuxdev
- 在Red Hat Enterprise Linux中有什麼型別的核心?Linux型別
- 【Linux】Virtualbox 安裝 Red hat Enterprise Linux 6.4-64位Linux
- 在red hat enterprise linux 5.4上安裝oracle11gLinuxOracle
- HP 4411s Install Red Hat Enterprise Linux 5.8) Wireless DriverLinux
- Red Hat Enterprise Linux 6使用 XDMCP (Xmanager)的一些設定Linux
- THP Transparent HugePages 相關知識與關閉
- G005-OS-INS-02 Red Hat Enterprise Linux V8.2 安裝Linux
- 變更RHEL(Red Hat Enterprise Linux 5.8)更新源使之自動更新Linux
- Red Hat Linux 入門指南!(轉)Linux
- Oracle9.2.0.4 在 Red Hat Enterprise 4上的安裝Oracle
- [zt]Oracle9i (9.2.0.4.0) Installation on Red Hat Enterprise Linux 5 (RHEL5)OracleLinux
- Xmanager2.0連線不上遠端的Red Hat Enterprise Linux5Linux
- Why is gam_server using up 100% of my CPU on Red Hat Enterprise Linux 4GAMServerLinux
- 如何檢視red hat linux 的版本Linux
- Red Hat Linux - top 命令簡易理解Linux
- Red Hat Linux - top 命令簡易理解Linux
- red hat linux 9.0安裝求助!(轉)Linux
- red hat enterprise linux(rhel) 3 、4、 5對應的asmlib包下載網址LinuxASM