How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7

$ Solution 已验证 - 已更新2017年六月2日23:54 - English

环境

Red Hat Enterprise Linux 7

transparent hugepages (THP)

tuned

问题

How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7

Disabling transparent hugepages (THP) on Red Hat Enterprise Linux 7 is not taking effect.

决议

Follow the steps below

1.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.

vim /etc/default/grub

GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap ... transparent_hugepage=never"

2.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

3.Reboot the system and verify option has been added

Reboot the system

# shutdown -r now

Verify the parameter is set correctly

# cat /proc/cmdline

正确的,应该含 transparent_hugepage=never

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

或者

# 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.

How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7的更多相关文章

  1. How to use, monitor, and disable transparent hugepages in Red Hat Enterprise Linux 6

    Resolution Note: Transparent Huge Pages are not available on the 32-bit version of RHEL 6. Transpare ...

  2. Disable or enable the IPv6 protocol in Red Hat Enterprise Linux

    Resolution Red Hat Enterprise Linux 4, 5 and 6 enable Internet Protocol Version 6 (IPv6) by default. ...

  3. setting up a IPSEC/L2TP vpn on CentOS 6 or Red Hat Enterprise Linux 6 or Scientific Linux

    This is a guide on setting up a IPSEC/L2TP vpn on CentOS 6 or Red Hat Enterprise Linux 6 or Scientif ...

  4. Configure Red Hat Enterprise Linux shared disk cluster for SQL Server——RHEL上的“类”SQL Server Cluster功能

    下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) ...

  5. [转] KVM storage performance and cache settings on Red Hat Enterprise Linux 6.2

    Almost one year ago, I checked how different cache settings affected KVM storage subsystem performan ...

  6. Interpreting /proc/meminfo and free output for Red Hat Enterprise Linux 5, 6 and 7

    Interpreting /proc/meminfo and free output for Red Hat Enterprise Linux 5, 6 and 7 Solution Verified ...

  7. Common administrative commands in Red Hat Enterprise Linux 5, 6, and 7

    https://access.redhat.com/articles/1189123 Common administrative commands in Red Hat Enterprise Linu ...

  8. Configure Red Hat Enterprise Linux shared disk cluster for SQL Server

    下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) ...

  9. Red Hat Enterprise Linux 6安装好,开启网卡到搭建tftp服务器和安装dnw驱动,安装samba服务器

    今天一顿误操作,只能把Red Hat Enterprise Linux 6重新安装,一些必备工作只能重做,重做之后立马把Linux的文件备份,以备不时只需! 开启Linux以太网卡:vim /etc/ ...

随机推荐

  1. Centos7中一键安装zabbix

    作者:邓聪聪 #!/bin/shlog=/root/install.logexec 2>>$log #关闭SELINUX,防火墙 systemctl stop firewalld.serv ...

  2. 002_soa_zk处理经验总结

    一. 遇到这种情况直接把当前目录下的acceptedEpoch和currentEpoch挪走,重启publisher即可. cat /data/zookeeper/data/version-2/acc ...

  3. lua 调用参数报错(a userdata value)

    本来想用这种方式统一安全删除node,后来发现参数变成(a userdata value),所以不能用下面这个方式做 方法如下: function RemoveNodeSafe(node) if no ...

  4. centos6.8_manul_install_oracle112040&manu_create_db

    --1.1上传oracle软件包及安装环境检查--redhat6.8下载链接:https://pan.baidu.com/s/1eTyw102 密码:cpfs--虚拟机使用独立磁盘时不能拍摄快照--创 ...

  5. Bag of Tricks for Image Classification with Convolutional Neural Networks论文笔记

    一.高效的训练     1.Large-batch training 使用大的batch size可能会减小训练过程(收敛的慢?我之前训练的时候挺喜欢用较大的batch size),即在相同的迭代次数 ...

  6. 浅谈z-index

    z-index使用条件 CSS3之前,z-index属性只有和定位元素在(postion不为static的元素)一起的时候才会有作用,但CSS3中flex盒子的子元素也可以设置z-index.理论上来 ...

  7. Postgresql查询出换行符和回车符:

    1.有时候,业务因为回车和换行出现的错误,第一步,首先要查询出回车符和换行符那一条数据: -- 使用chr()和chr()进行查询 SELECT * )||)||'%'; -- 其实查询chr()和c ...

  8. gflags_static.lib 无法解析的外部符号 __imp__PathMatchSpec

    在用gflags库时生成提示 无法解析的外部符号 __imp__PathMatchSpec   解决办法:Add "shlwapi.lib" to "Project - ...

  9. SQL Server 中执行Shell脚本计算本地文件的内容大小

    SQL Server 数据库中除了能执行基本的SQL语句外,也可以执行Shell脚本.默认安装后,SQL中的Shell脚本的功能是关闭的,需要手动打开, 执行以下脚本即可打开该功能. -- 允许配置高 ...

  10. hadoop1.2开发环境搭建

    一:Vmware上安装Linux系统 二:配置Vmware NAT网络.(详细说明:vmware三种网络模式 - 简书). NAT是网络地址转换,是在宿主机和虚拟机之间增加一个地址转换服务,负责外部和 ...