How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7
# 檢視透明大頁面是否開啟 [root@db-oracle-node1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled [always] madvise never # 檢視透明大頁面整理碎片功能是否開啟,THP defragmentation [root@db-oracle-node1 ~]# cat /sys/kernel/mm/transparent_hugepage/defrag [always] madvise never
Follow the steps below
Add the "transparent_hugepage=never" kernel parameter option to the grub2 configuration file.
Append or change the "transparent_hugepage=never" kernel parameter on the GRUB_CMDLINE_LINUX option
in /etc/default/grub file. Only include the parameter once.
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap ... transparent_hugepage=never"
Rebuild the /boot/grub2/grub.cfg file by running the grub2-mkconfig -o command as follows:
Please ensure to take a backup of the existing /boot/grub2/grub.cfg before rebuilding.
On BIOS-based machines: ~]# grub2-mkconfig -o /boot/grub2/grub.cfg On UEFI-based machines: ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Reboot the system and verify option has been added
Reboot the system
# shutdown -r now
Verify the parameter is set correctly
# cat /proc/cmdline
If Transparent Huge Pages (THP) is still not disabled, continue and use one of the options below.
Option 1:
(Recommended) create a customized tuned profile with disabled THP
With this resolution we will create a customized version of the currently running profile. The customized version
will disable THP.
Find out which profile is active, create a copy. In the following example we currently use
the throughput-performance profile:
# tuned-adm active
Current active profile: throughput-performance
To create customized profile, create a new directory in /etc/tuned directory with desired profile name.
# mkdir /etc/tuned/myprofile-nothp
Then create a new tuned.conf file for myprofile-nothp, and insert the new tuning info:
# cat /etc/tuned/myprofile-nothp/tuned.conf [main] include= throughput-performance [vm] transparent_hugepages=never
Make the script executable:
# chmod +x /etc/tuned/myprofile-nothp/tuned.conf
Enable myprofile like so:
# tuned-adm profile myprofile-nothp
This change will immediately take effect and persist reboots.
To verify if THP are disabled or not, run below command:
# cat /sys/kernel/mm/transparent_hugepage/enabled
Option 2: (Alternative) Disable tuned services
This resolution will disable the tuned services.
# systemctl stop tuned # systemctl disable tuned
OR
# tuned-adm off
Now add "transparent_hugepage=never" kernel parameter in grub2 configuration file as explained in steps 1-3
above.
Reboot the server for changes to take effect.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31439444/viewspace-2674001/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- How to disable transparent Hugepage (THP) on Red Hat Enterprise Linux 8?Linux
- 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
- Red Hat 7.x 配置ArcGIS Enterprise開機自動啟動
- Red Hat Enterprise Linux 6 7關閉透明大頁面及透明大頁面基礎概念Linux
- G005-OS-INS-02 Red Hat Enterprise Linux V8.2 安裝Linux
- 甲骨文與紅帽擴大合作,將Red Hat Enterprise Linux引入 Oracle Cloud InfrastructureLinuxOracleCloudASTStruct
- Red Hat Linux安裝CentOS的yum源LinuxCentOS
- Linux red hat 核心版下安裝NginxLinuxNginx
- Linux Red Hat啟動時顯示system not foundLinux
- Red Hat 7.5 Yum Replacement
- HugePages on LinuxLinux
- 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 7.9安裝達夢資料庫DM8 使用Xmanager Enterprise 5啟動圖形化時報錯資料庫
- VS Code擴充--Language Support for Java(TM) by Red Hat(1.3.0)Java
- 攻略 - 自建 Red Hat 企業級系統 Vagrant Box
- [20221222]How to Enable and Disable Database Options in oracle 11g.txtDatabaseOracle
- 三國爭霸 Mint、Ubuntu 和 Red Hat 巔峰對決Ubuntu
- 解決出現This system is not registered to Red Hat Subscription Management的問題
- 收購Red Hat,能否讓步履維艱的IBM走出困境?IBM
- 微軟和Red Hat合體:幫助企業更方便部署容器微軟
- How to Install ClamAV on CentOS 7CentOS
- 【Autofs】How to Configure Autofs on CentOS 7?CentOS
- How to Install VirtualBox 5.2 on CentOS 7CentOS
- IBM宣佈以340億美元收購Red Hat,組建混合雲提供商IBM
- How to Install and Secure Redis on Centos7RedisCentOS
- How to Install and Configure VNC Server in CentOS 7VNCServerCentOS
- Transparent Tribe行動
- HugePages詳解
- How to Add a New Disk new partition in centos7CentOS
- Red Hat 7.9安裝達夢資料庫DM8圖形化顯示英文和亂碼資料庫
- local_irq_disable和disable_irq的區別
- 【TUNE_ORACLE】Oracle資料庫與HugePages(二)HugePages配置和限制Oracle資料庫