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 Linux 9的簡介Linux
- Red Hat Enterprise Linux Server 7.4 安裝LinuxServer
- Red Hat Enterprise Linux 10 下載 - 紅帽企業 LinuxLinux
- 《Red Hat Enterprise Linux 9 系統管理實戰》簡介Linux
- G005-OS-INS-02 Red Hat Enterprise Linux V8.2 安裝Linux
- 甲骨文與紅帽擴大合作,將Red Hat Enterprise Linux引入 Oracle Cloud InfrastructureLinuxOracleCloudASTStruct
- [20210428]AnonHugePages與transparent hugepage.txt
- Red Hat 7.x 配置ArcGIS Enterprise開機自動啟動
- [20220909]AnonHugePages與transparent hugepage 3.txt
- Red Hat Enterprise Linux 6 7關閉透明大頁面及透明大頁面基礎概念Linux
- Linux red hat 核心版下安裝NginxLinuxNginx
- Red Hat Linux安裝CentOS的yum源LinuxCentOS
- Linux Red Hat啟動時顯示system not foundLinux
- Red Hat 7.5 Yum Replacement
- [20210803]對比transparent hugepage的記憶體消耗.txt記憶體
- Red Hat 7.9安裝達夢資料庫DM8 使用Xmanager Enterprise 5啟動圖形化時報錯資料庫
- Kioptrix Level 1(Apache/1.3.20 (Unix) (Red-Hat/Linux) mod_ssl/2.8.4)ApacheLinux
- 在Red Hat和Centos上安裝MongoDBCentOSMongoDB
- 紅帽釋出 Red Hat Enterprise Linux 9!轉向邊緣和多雲|下一代企業 IT 基礎設施旗艦Linux
- 新的安全漏洞正影響 CentOS 和 Red Hat Linux 發行版CentOSLinux
- 攻略 - 自建 Red Hat 企業級系統 Vagrant Box
- VS Code擴充--Language Support for Java(TM) by Red Hat(1.3.0)Java
- [20221222]How to Enable and Disable Database Options in oracle 11g.txtDatabaseOracle
- 收購Red Hat,能否讓步履維艱的IBM走出困境?IBM
- 解決出現This system is not registered to Red Hat Subscription Management的問題
- 三國爭霸 Mint、Ubuntu 和 Red Hat 巔峰對決Ubuntu
- Red Hat 7.9安裝達夢資料庫DM8圖形化顯示英文和亂碼資料庫
- 微軟和Red Hat合體:幫助企業更方便部署容器微軟
- Linux AS 5中hugepage的一些變化Linux
- IBM宣佈以340億美元收購Red Hat,組建混合雲提供商IBM
- Transparent Tribe行動
- Linux 中的“大記憶體頁”(hugepage)是個什麼?Linux記憶體
- Oracle在Linux下對記憶體大頁HugePage的實踐OracleLinux記憶體
- local_irq_disable和disable_irq的區別
- redhat enterprise linux中vsftp開機自啟動RedhatLinuxFTP
- Hat靶場
- disable Nouveau kernel driver