THP Transparent HugePages 相關知識與關閉,thphugepages

來源:互聯網
上載者:User

THP Transparent HugePages 相關知識與關閉,thphugepages

最近遇到個LINUX系統記憶體比較大,未開 HugePages,業務有變化導致ORACLE串連數劇增至上千個,PageTables達到上百G,導致記憶體不足系統HANG住的案例。

  因此需要開啟 HugePages,作業系統是OEL6以上的。LINUX的以下版本: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是預設開啟的,因此在這些版本的LINUX系統中,ORACLE強烈建議開啟HugePages需要關閉Transparent HugePages。

在以下版本的LINUX中Transparent HugePages預設是關閉--從核心移除的。

Transparent HugePages memory is disabled in later releases of Oracle Linux UEK2 kernels.

驗證方法是:如果以下檔案不存在,則是THP已經從核心中移除。

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

參考MOS文檔:ALERT: Disable Transparent HugePages on SLES11, RHEL6, OL6 and UEK2 Kernels (文檔 ID 1557478.1)

或者OEL的以下文檔:

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

C.3 Disabling 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.

o 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:



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.