oracle之 关闭透明大页

简介:

方法一:

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时也必须关闭透明大页功能


本文转自 张冲andy 博客园博客,原文链接: http://www.cnblogs.com/andy6/p/7612432.html  ,如需转载请自行联系原作者


相关文章
|
druid Oracle 关系型数据库
奇奇怪怪的问题-Druid+Oracle连接超时关闭问题
SpringBoot+Druid+Oracle连接超时关闭问题
1362 0
|
Oracle 关系型数据库 数据库
Oracle RAC集群启动与关闭,涵盖所有版本
Oracle RAC集群启动与关闭,涵盖所有版本
841 0
Oracle RAC集群启动与关闭,涵盖所有版本
|
SQL 缓存 Oracle
Java 技术篇 - 连接oracle数据库执行sql使用close()关闭createStatement()无效无法清除游标缓存问题解决,报“ORA-01000: 超出打开游标的最大数“错误解决方法
Java 技术篇 - 连接oracle数据库执行sql使用close()关闭createStatement()无效无法清除游标缓存问题解决,报“ORA-01000: 超出打开游标的最大数“错误解决方法
521 0
Java 技术篇 - 连接oracle数据库执行sql使用close()关闭createStatement()无效无法清除游标缓存问题解决,报“ORA-01000: 超出打开游标的最大数“错误解决方法
|
SQL Oracle 关系型数据库
Mac 技术篇-Oracle数据库连接工具SQL Developer启用、关闭自动提交事务,设置自动commit
Mac 技术篇-Oracle数据库连接工具SQL Developer启用、关闭自动提交事务,设置自动commit
890 0
Mac 技术篇-Oracle数据库连接工具SQL Developer启用、关闭自动提交事务,设置自动commit
|
存储 SQL Oracle
Oracle 启动与关闭
本文目录 1. 简介 2. 设置Oracle数据库手工启动 3. Oracle数据库服务说明 4. 关闭Oracle数据库
149 0
Oracle 启动与关闭
|
监控 Oracle 关系型数据库
|
Oracle 关系型数据库 数据库

推荐镜像

更多