Transparent HugePages 详解

之前写过关于HugePages的,当时是介绍ORACLE在大内存下建议开启大页内存管理。
文章的链接为 http://blog.csdn.net/gua___gua/article/details/22613691

今天写下关于Transparent HugePages的,这个也大页内存管理,不过他和标准的大页内存管理有区别。
Transparent HugePages是在运行时动态分配内存的,而标准的HugePages是在系统启动时预先分配内存,并在系统运行时不再改变。

因为Transparent HugePages是在运行时动态分配内存的,所以会带来在运行时内存分配延误。所以ORACLE是建议不使用Transparent HugePages功能的,如果需要大页内存管理功能来加强性能,建议使用标准的大页内存管理。

MYSQL的TOKUDB强制必须关闭Transparent HugePages功能,否则启动不了数据库。
之前也写了相关的文章
http://blog.csdn.net/gua___gua/article/details/49615081

下面是ORACLE官方的文档:

下面有关于Transparent HugePages查看和关闭的方式

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

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.

See Also:
Oracle Database Administrator's Reference for Linux and UNIX-Based Operating Systems for information about HugePages
To 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:
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
Restart the system to make the changes permanent.



  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值