Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Turn off the transparent large page of oracle

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Method 1:

1. Set the/etc/grub.conf file and add transparent_hub =never, which is disabled at system startup.

[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 ##Add to tty0, note that a space is left

initrd /initramfs-2.6.32-573.el6.x86_64.img

Restart the server

3. Check whether it is closed

# grep AnonHugePages /proc/meminfo

If the output contains a line like "AnonHugepages:

xxxx kB", with a value > 0kB, the kernel is using Transparent HugePages.

Method 2:

1. Edit/etc/rc.local to add the following memory

[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

Restart the server

3. Check whether it is closed

# grep AnonHugePages /proc/meminfo

If the output contains a line like "AnonHugepages:

xxxx kB", with a value > 0kB, the kernel is using Transparent HugePages.

Additional:

1: Starting with RedHat 6, OEL 6, SLES 11 and UEK2 kernels, Transparent HugePages is enabled by default: Transparent HugePages are used to improve memory management performance and are similar in function to large pages in previous versions. The main differences are: Transparent HugePages can be configured in real-time and does not require a restart to take effect;

2: Transparent Huge Pages is not supported in RHEL 6, 32 bit.

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

3: ORACLE official does not recommend that we use RedHat 6, OEL 6, SLES 11 and UEK2 kernels when opening Transparent HugePages, because there are some problems with Transparent HugePages:

1. Transparent HugePages in RAC environment will cause abnormal node restart and performance problems;

2. Transparent Huge Pages can also cause some unusual performance problems in a standalone environment;

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: Transparent Large Pages must also be turned off when installing Vertica Analytic Database

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 245

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report