方法一:

1、设置/etc/grub.conf文件,添加 transparent_hugepage=never ,在系统启动是禁用

[root@hbdw1 ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux 6 (2.6.32-573.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root=UUID=57f7184b-2dec-43b1-b0cd-9862a4b42cfe rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_NO_LVM rhgb quiet rd_NO_DM rhgb quiet memmap=0x2000000$0x3E000000 nmi_watchdog=2 crashkernel=256M-:256M printk.time=1 console=ttyS0,115200 console=tty0 transparent_hugepage=never ##添加到 tty0 后面,注意留一个空格
initrd /initramfs-2.6.32-573.el6.x86_64.img

2、 重启服务器

3、检查是否关闭

# grep AnonHugePages /proc/meminfo

If the output contains a line like "AnonHugepages:
xxxx kB", with a value > 0kB, the kernel is using Transparent HugePages.

方法二:

1、编辑 /etc/rc.local 添加如下内存

[root]# cat /etc/rc.local
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi

2、 重启服务器

3、检查是否关闭

# grep AnonHugePages /proc/meminfo

If the output contains a line like "AnonHugepages:
xxxx kB", with a value > 0kB, the kernel is using Transparent HugePages.

补充:

1:从RedHat 6, OEL 6, SLES 11 and UEK2 kernels 开始,系统缺省会启用 Transparent HugePages :用来提高内存管理的性能透明大页(Transparent HugePages )和之前版本中的大页功能上类似。主要的区别是:Transparent HugePages 可以实时配置,不需要重启才能生效配置;

2:Transparent Huge Pages在32位的RHEL 6中是不支持的。

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

3: ORACLE官方不建议我们使用RedHat 6, OEL 6, SLES 11 and UEK2 kernels 时的开启透明大页(Transparent HugePages ), 因为透明大页(Transparent HugePages ) 存在一些问题:

1.在RAC环境下 透明大页(Transparent HugePages )会导致异常节点重启,和性能问题;

2.在单机环境中,透明大页(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.

Starting with RedHat 6, OEL 6, SLES 11 and UEK2 kernels, Transparent HugePages are implemented and enabled (default) in an attempt to improve the memory management. Transparent HugePages are similar to the HugePages that have been available in previous Linux releases. The main difference is that the Transparent HugePages are set up dynamically at run time by the khugepaged thread in kernel while the regular HugePages had to be preallocated at the boot up time. Because Transparent HugePages are known to cause unexpected node reboots and performance problems with RAC, Oracle strongly advises to disable the use of Transparent HugePages. In addition, Transparent Hugepages may cause problems even in a single-instance database environment with unexpected performance problems or delays. As such, Oracle recommends disabling Transparent HugePages on all Database servers running Oracle.

4:安装Vertica Analytic Database时也必须关闭透明大页功能

oracle之 关闭透明大页的更多相关文章

  1. Linux关闭透明大页配置

      一.为何要关闭透明大页 A--MOS获取 . #翻译 由于透明超大页面已知会导致意外的节点重新启动并导致RAC出现性能问题,因此Oracle强烈建议禁用透明超大页面. 另外,即使在单实例数据库环境 ...

  2. redhat linux 7.4关闭透明大页

    每一步: 在GRUB_CMDLINE_LINUX加入选项 transparent_hugepage=never echo 'GRUB_CMDLINE_LINUX="transparent_h ...

  3. linux关闭透明大页

    echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never > /sys/kernel/mm/transpare ...

  4. Transparent HugePages(透明大页)

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

  5. 禁用Linux透明大页

    Oracle 安装时官方建议关闭Linux的透明大页,防止内存延迟分配导致的性能问题 https://docs.oracle.com/cd/E11882_01/install.112/e47689/p ...

  6. 关闭centos大页及swappiness

    首先检查THP的启用状态: [root@localhost ~]# cat /sys/kernel/mm/transparent_hugepage/defrag [always] madvise ne ...

  7. Linux内存大页设置

    实际环境中,遇到3次由于内存大页设置参数不合理或者错误,导致系统内存不足,或者数据库内存不足的问题. 按照如下方式,推荐设置大页参考下发设置! 参考HugePages on Oracle Linux ...

  8. OpenStack 高性能虚拟机之大页内存

    目录 文章目录 目录 前文列表 虚拟存储器系统 页式虚拟存储器 大页内存 Linux 的大页内存 大页的实现原理 大页内存配置 透明巨型页 THP 大页面对内存的影响 Nova 虚拟机的大页内存设置 ...

  9. Thermostat:双层存储结构的透明巨页内存管理机制

    这是一篇由密歇根大学的Neha Agarwal 和 Thomas F. Wenisch,发表在计算机系统顶会ASLOS的论文,Thermostat: Application-transparent P ...

随机推荐

  1. oracle中 start with .. connect by prior.. 用法简介

    我们经常会将一个比较复杂的目录树存储到一个表中.或者将一些部门存储到一个表中,而这些部门互相有隶属关系.这个时候你就会用到connect by prior start with.oracle 提供了s ...

  2. fileupload上传文件时带参数

    var userID = ""; $('#picture').fileupload({ url: "http://localhost:35708/Handler/File ...

  3. HDU1503Advanced Fruits

    /*给出两串,求一个最小的字符串包含这两个子串,子串在这个字符串中的顺序不变, 做法:定义两个数组,分别标记公共部分在第一个串和第二个串中的位置,在输出是判断一下,输出一个串两个公共部分之间的部分,不 ...

  4. bzoj1999 / P1099 树网的核

    P1099 树网的核 (bzoj数据加强) 前置知识:树的直径 (并不想贴我的智障写法虽然快1倍但内存占用极大甚至在bzoj上MLE) 正常写法之一:用常规方法找到树的直径,在直径上用尺取法找一遍,再 ...

  5. 20145105 《Java程序设计》第1周学习总结

    20145105 <Java程序设计>第1周学习总结 教材学习内容总结 学习了教材的第一章后,我初步了解了Java的发展历程,以及什么是JCP,JSR,JVM.JCP是一个开放性国际组织, ...

  6. 20145315 《Java程序设计》第七周学习总结

    20145315 <Java程序设计>第七周学习总结 教材学习内容总结 第十三章 时间与日期 13.1.1时间的度量 1.格林威治时间(GMT):参考太阳到达最高点,有时间误差. 2.世界 ...

  7. 20145315 《Java程序设计》第二周学习总结

    20145315 <Java程序设计>第二周学习总结 教材学习内容总结 类型 类型:整数分为short,int,long形. 字节:长度为一字节. 浮点数:储存小数,float和doubl ...

  8. Tomcat启动报StackOverflowError

    近期工程部署到Tomcat时,出现以下异常: 16-May-2018 09:35:25.590 严重 [localhost-startStop-1] org.apache.catalina.core. ...

  9. Block作为参数时的使用

    Block作为参数使用,常见于各框架之中,比如在封装一个类时,当做什么事情由外界去决定,什么时候调用由自己的类决定时,这时候就需要将block作为参数使用. 下面我们模仿AFNetworking的ma ...

  10. 路由器实操 能够登陆QQ 收发信息正常 但游览器无法连接网页

    这种情况下,网络是没有问题的. ping www.baidu.com 失败,但是能上QQ说明网络没有问题:这一般是域名解析DNS的问题. 游览器登陆192.168.1.1.输入用户密码,均为admin ...