近期遇到个LINUX系统内存比較大。未开 HugePages,业务有变化导致ORACLE连接数剧增至上千个,PageTables达到上百G。导致内存不足系统HANG住的案例。

因此须要开启 HugePages,操作系统是OEL6以上的。LINUX的下面版本号:Red Hat Enterprise Linux 6, SUSE Linux Enterprise Server 11, and Oracle Linux 6 with earlier releases of Oracle Linux Unbreakable Enterprise Kernel 2 (UEK2) kernels. Transparent HugePages是默认开启的。因此在这些版本号的LINUX系统中,ORACLE强烈建议开启HugePages须要关闭Transparent
HugePages。

在下面版本号的LINUX中Transparent HugePages默认是关闭--从内核移除的。

Transparent HugePages memory is disabled in later releases of Oracle Linux UEK2 kernels.

验证方法是:假设下面文件不存在,则是THP已经从内核中移除。

/sys/kernel/mm/transparent_hugepage or
/sys/kernel/mm/redhat_transparent_hugepage

參考MOS文档:ALERT: Disable Transparent HugePages on SLES11, RHEL6, OL6 and UEK2 Kernels (文档 ID 1557478.1)

或者OEL的下面文档:

https://docs.oracle.com/cd/E11882_01/install.112/e41961/memry.htm#CWLIN385

C.3 Disabling Transparent HugePages

Transparent HugePages memory is enabled by default with Red Hat Enterprise Linux 6, SUSE Linux Enterprise Server 11, and Oracle Linux 6 with earlier releases of Oracle Linux Unbreakable Enterprise Kernel 2 (UEK2) kernels.
Transparent HugePages memory is disabled in later releases of Oracle Linux UEK2 kernels.

Transparent HugePages can cause memory allocation delays during runtime. To avoid performance issues,
Oracle recommends that you disable Transparent HugePages on all Oracle Database servers.
Oracle recommends that you instead use standard HugePages for enhanced performance.

Transparent HugePages memory differs from standard HugePages memory because the kernel khugepaged thread allocates memory dynamically during runtime. Standard HugePages memory is pre-allocated at startup, and does not change during runtime.

o check if Transparent HugePages memory is enabled, run one of the following commands as the
root user:

Red Hat Enterprise Linux kernels:

# cat /sys/kernel/mm/redhat_transparent_hugepage/enabled

Other kernels:

# cat /sys/kernel/mm/transparent_hugepage/enabled

The following is a sample output that shows Transparent HugePages memory being used as the
[always] flag is enabled.

[always] never

Note:

If Transparent HugePages is removed from the kernel, then the
/sys/kernel/mm/transparent_hugepage or /sys/kernel/mm/redhat_transparent_hugepage files do not exist.

To disable Transparent HugePages, perform the following steps:

  1. Add the following entry to the kernel boot line in the /etc/grub.conf file:

    transparent_hugepage=never
    

    For example:

    title Oracle Linux Server (2.6.32-300.25.1.el6uek.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-300.25.1.el6uek.x86_64 ro root=LABEL=/ transparent_hugepage=never
    initrd /initramfs-2.6.32-300.25.1.el6uek.x86_64.img
  2. Restart the system to make the changes permanent.

THP Transparent HugePages 相关知识与关闭的更多相关文章

  1. THP Transparent HugePages 相关知识与关闭【转】

    最近遇到个LINUX系统内存比较大,未开 HugePages,业务有变化导致ORACLE连接数剧增至上千个,PageTables达到上百G,导致内存不足系统HANG住的案例. 因此需要开启 HugeP ...

  2. THP Transparent HugePages关闭

    ambari 安装Hortonworks HDP 时在检测host异常 The following hosts have Transparent Huge Pages (THP) enabled.TH ...

  3. 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年六月 ...

  4. Linux 关于Transparent Hugepages的介绍

    透明大页介绍 Transparent Huge Pages的一些官方介绍资料: Transparent Huge Pages (THP) are enabled by default in RHEL ...

  5. Transparent HugePages(透明大页)

    Transparent HugePages(透明大页) 1. 介绍 从RedHat6, RedHat7, OL6, OL7 SLES11 and UEK2 kernels开始,透明大页默认是被开启的以 ...

  6. Linux 关于Transparent Hugepages的介绍【转】

    透明大页介绍 Transparent Huge Pages的一些官方介绍资料: Transparent Huge Pages (THP) are enabled by default in RHEL ...

  7. 【转】java NIO 相关知识

    原文地址:http://www.iteye.com/magazines/132-Java-NIO Java NIO(New IO)是从Java 1.4版本开始引入的一个新的IO API,可以替代标准的 ...

  8. 【转载】前端面试“http全过程”将所有HTTP相关知识抛出来了...

    原文:前端面试“http全过程”将所有HTTP相关知识抛出来了... 来一篇串通,一个http全过程的问题,把所有HTTP相关知识点都带过一遍 http全过程 输入域名(url)-->DNS映射 ...

  9. HTTP协议知多少-关于http1.x、http2、SPDY的相关知识

    作为网站开发的基础协议,我们知道浏览器上都有输出http这四个字母,这意味着什么呢? 这就是最基础的HTTP协议. 逐浪君今天为各位大人准备了一些HTTP技术的知识,来和大家分享. 以下图为例: 这一 ...

随机推荐

  1. 一道C语言面试题:得到整数的M进制表示字符串

    题目:输入整数n和M,输出n在M进制下的表示字符串.如n=3000,M=16,输出16进制下3000的表示字符串,为“BB8” 来源:某500强企业面试题目 思路:对n取模M,将得到的数字压入栈中,再 ...

  2. Go语言(golang)开源项目大全

    转http://www.open-open.com/lib/view/open1396063913278.html内容目录Astronomy构建工具缓存云计算命令行选项解析器命令行工具压缩配置文件解析 ...

  3. linux swap 分区调控(swap分区 lvm管理)

    注:linux swap分区 采用lvm管理,调控可以采用下面的方法 一.查看 swap    lv [root@testdb ~]# vgdisplay -v Finding all volume ...

  4. zookeeper数据弱一致性

    zookeeper本身支持单机部署和集群部署,生产环境建议使用集群部署,因为集群部署不存在单点故障问题,并且zookeeper建议部署的节点个数为奇数个,只有超过一半的机器不可用整个zk集群才不可用. ...

  5. 751D·PARK北京时尚设计广场_百度百科

    751D·PARK北京时尚设计广场_百度百科 751D·PARK北京时尚设计广场

  6. linux动态库加载时搜索路径

    摘自http://gotowqj.iteye.com/blog/1926613 对动态库的实际应用还不太熟悉的读者可能曾经遇到过类似“error while loading shared librar ...

  7. hdu 5595 GTW likes math(暴力枚举查询)

    思路:直接暴力枚举区间[l,r]的整数值,然后max和min就可以了. AC代码: #pragma comment(linker, "/STACK:1024000000,1024000000 ...

  8. H面试程序(11): 判断字符串是否包含子串问题

    题目描述:                        如字符串str1为''abcdef'''                       字符串str2为'' bc''; 则字符串str1中含有 ...

  9. fseek/ftell/rewind/fgetpos/fsetpos函数使用-linux

    程序: #include<stdio.h> int main(int argc,char *argv[]) { FILE * stream; fpos_t pos; stream = fo ...

  10. java的静态代理

    解决这个问题:在多个模块要插入一段功能,比方,在不同业务处理模块中,都须要检查用户是否登录,假设不使用代理的话,每添加一个模块,就须要添加非常多代码. 比方,除了推断是否登录,假设还须要添加一个记录日 ...