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

http://www.usreplica.me

http://www.ukreplica.me

http://www.watch527.com

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Oracle性能优化》是Oracle四大宝典之一,它是针对如何提高Oracle数据库性能的指南。尤其对于大型企业级数据库系统来说,性能优化是至关重要的,能够提升系统的响应速度,提高数据处理效率,保证业务的顺利进行。 在《Oracle性能优化》一书中,作者深入介绍了性能优化的各个方面,包括数据库设计、查询优化、索引优化、存储优化等。首先,作者强调了合理的数据库设计的重要性,通过合理的表结构设计、数据类型选择、范式设计等,可以减少数据冗余和不一致,提高查询效率。其次,作者介绍了查询优化的方法,包括优化SQL语句、合理使用Oracle内置函数和操作符、避免全表扫描等,可以减少查询的时间和资源消耗。此外,作者还详细介绍了索引的使用和优化技巧,包括选择合适的索引类型、为关键查询字段创建索引、避免过多索引等,以加快查询速度。最后,作者分享了一些存储优化的实践经验,如适当调整存储参数、合理划分表空间、使用归档模式等,以提升数据库的整体性能。 总的来说,《Oracle性能优化》是一本宝贵的指南,对于学习和实践Oracle性能优化技术的人来说具有很高的参考价值。通过掌握其中的知识,数据库管理员和开发人员能够更好地了解Oracle数据库的性能瓶颈,并能够采取相应的优化措施来改善数据库的性能。最终,这将提高企业的业务效率和竞争力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值