THP Transparent hugepages related knowledge and close

Source: Internet
Author: User

Recently encountered a Linux system memory is relatively large, not open hugepages, business changes caused by the number of Oracle connections to thousands, pagetables up to hundreds of g, resulting in low memory system hang live case.

therefore need to turn on hugepages, operating system is OEL6 above. The following versions of Linux: Red Hat Enterprise Linux 6, SUSE Linux Enterprise Server One, and Oracle Linux 6 with earlier releases of Oracle Linux Unbreakable Enterprise Kernel 2 (UEK2) kernels. Transparent Hugepages is turned on by default, so in these versions of Linux systems, Oracle strongly recommends that the hugepages need to be turned off Transparent hugepages.

In the following versions of Linux transparent Hugepages is turned off by default-removed from the kernel.

Transparent hugepages memory is disabled in later releases of Oracle Linux UEK2 Kernels.

The authentication method is: If the following file does not exist, then THP has been removed from the kernel.

/sys/kernel/mm/transparent_hugepage or /sys/kernel/mm/redhat_transparent_hugepage

Reference MOS Documentation: Alert:disable Transparent hugepages on SLES11, RHEL6, OL6 and UEK2 Kernels (document ID 1557478.1)

or oel the following documents:

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

C.3disabling Transparent hugepages

Transparent hugepages memory is enabled by default with Red Hat Enterprise Linux 6, SUSE Linux Enterprise Server one, and O Racle 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 so disable Transparent hugepages on all Oracle Database servers. oracle recommends that's 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 are pre-allocated at startup, and does not the change during runtime.

o Check if Transparent hugepages memory is enabled, run one of the following commands as the rootUser

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, shows Transparent hugepages memory being used as the [always] flag is enabled.

[Always] Never

Note:

If Transparent hugepages is removed from the kernel and then the /sys/kernel/mm/transparent_hugepage or /sys/kernel/mm/redhat_transparent_hugepage files does not exist.

To disable Transparent hugepages, perform the following steps:

    1. 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
    2. Restart the system to make the changes permanent.



THP Transparent hugepages related knowledge and close

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.