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. Beta 冲刺(4/7)

    目录 摘要 团队部分 个人部分 摘要 队名:小白吃 组长博客:hjj 作业博客:beta冲刺(4/7) 团队部分 后敬甲(组长) 过去两天完成了哪些任务 整理博客 ppt模板 接下来的计划 做好机动. ...

  2. Linux下安装VMware Tools(使虚拟机支持文件拖拽)

    如图点击虚拟机找到安装VMware Tools选项,点击后会在虚拟机桌面显示一个光盘,双击进入如下页面: 选择压缩包将其复制放入Home中不带中文的文件夹: 打开终端,输入cd命令进入文件夹,将压缩包 ...

  3. 1.2低级线程处理API

    并行扩展库相当有用,因为它允许使用更高级的抽象——任务,而不必直接和线程打交道.但有的时候,要处理的代码是在TPL和PLINQ问世(.NET4.0)之前写的.也有可能某个编程问题不能直接使用它们解决, ...

  4. 【原创】大叔经验分享(43)logstash设置jdbc_default_timezone后报错

    logstash6.6.0-6.6.2版本使用jdbc input plugin时如果设置了jdbc_default_timezone,会报错: { 2012 rufus-scheduler inte ...

  5. 27)django-form操作示例(动态Select数据,自定义字段验证,全局验证等)

    1)普通传递select数据 # -*- coding:utf-8 -*- __author__ = 'shisanjun' from django import forms from django. ...

  6. linux 安装telnet命令及使用

    一.CentOS下查看系统是否已安装telnetrpm -qa | grep telnettelnet-0.17-48.el6.x86_64telnet-server-0.17-48.el6.x86_ ...

  7. 浏览器兼容html头部<meta>标签主要内容详情

    <!DOCTYPE html> <head> <meta http-equiv="X-UA-Compatible" content="IE= ...

  8. 11、Grafana 5.0 新功能特性(译文)

      Grafana v5.0的新功能 这是Grafana有史以来最重大的更新. 本文将详细介绍主要的新功能和增强功能. New Dashboard Layout Engine enables a mu ...

  9. SQL反模式学习笔记17 全文搜索

    目标:全文搜索 使用SQL搜索关键字,同时保证快速和精确,依旧是相当地困难. SQL的一个基本原理(以及SQL所继承的关系原理)就是一列中的单个数据是原子性的. 反模式:模式匹配 使用Like 或者正 ...

  10. 洛谷P4482 [BJWC2018]Border 的四种求法 字符串,SAM,线段树合并,线段树,树链剖分,DSU on Tree

    原文链接https://www.cnblogs.com/zhouzhendong/p/LuoguP4482.html 题意 给定一个字符串 S,有 q 次询问,每次给定两个数 L,R ,求 S[L.. ...