How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7
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的更多相关文章
- 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 ...
- 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. ...
- 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 ...
- Configure Red Hat Enterprise Linux shared disk cluster for SQL Server——RHEL上的“类”SQL Server Cluster功能
下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) ...
- [转] 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 ...
- 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 ...
- 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 ...
- Configure Red Hat Enterprise Linux shared disk cluster for SQL Server
下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) ...
- Red Hat Enterprise Linux 6安装好,开启网卡到搭建tftp服务器和安装dnw驱动,安装samba服务器
今天一顿误操作,只能把Red Hat Enterprise Linux 6重新安装,一些必备工作只能重做,重做之后立马把Linux的文件备份,以备不时只需! 开启Linux以太网卡:vim /etc/ ...
随机推荐
- Laravel -- 邮箱功能配置问题
```` 今天碰到了这块的问题,还是记一下 ```` 关于邮箱: 品牌:腾讯qq.网易163 等 种类:个人.企业 邮箱服务器种类 配置教程 https://jingyan.baidu.com/art ...
- leetcode(js)算法10之正则表达式匹配
mmp,对着答案看了三遍才看懂,真是菜的抠脚 给定一个字符串 (s) 和一个字符模式 (p).实现支持 '.' 和 '*' 的正则表达式匹配. '.' 匹配任意单个字符. '*' 匹配零个或多个前面的 ...
- mysql的小常识
为了爬虫的需要,稍微预习一下mysql: 选择当前的数据库后,查看数据库信息用: USE; 删除:DROP DATABASE spiders #删除name为spiders的的数据库 选择:SELEC ...
- fs.inotify.max_user_watches默认值太小,导致too many open files
运行环境:centos7.5 linux 打开文件数 too many open files 解决方法fs.inotify.max_user_watches默认值太小,导致too many open ...
- day13-迭代器及生成器
iterable:可迭代的:iterator:迭代器: print(dir([ ])) #打印出列表所拥有的所有方法: 可迭代协议:只要含有__iter__方法的都是可迭代的. 迭代器协议:含有__ ...
- iOS开发之用到的几种锁整理
1. iOS中的互斥锁 在编程中,引入对象互斥锁的概念,来保证共享数据操作的完整性.每个对象都对应于一个可称为“互斥锁”的标记,这个标记用来保证在任一时刻,只能有一个线程访问对象. 1.1 @sync ...
- using 关键字的作用
我们都知道可以使用using关键字引入命名空间,例如:using namespace std; using还有个作用是在子类中引入父类成员函数. 1) 当子类没有定义和父类同名的函数(virtual也 ...
- CodeForces 553E Kyoya and Train 动态规划 多项式 FFT 分治
原文链接http://www.cnblogs.com/zhouzhendong/p/8847145.html 题目传送门 - CodeForces 553E 题意 一个有$n$个节点$m$条边的有向图 ...
- 【Java】 剑指offer(11) 矩阵中的路径
本文参考自<剑指offer>一书,代码采用Java语言. 更多:<剑指Offer>Java实现合集 题目 请设计一个函数,用来判断在一个矩阵中是否存在一条包含某字符串所有字 ...
- 014 链表中倒数第k个结点
1.题目 输入一个链表,输出该链表中倒数第k个结点. 2.思路 Java代码,通过校验.代码思路如下:两个指针,先让第一个指针和第二个指针都指向头结点,然后再让第一个指正走(k-1)步,到达第k个节点 ...