THP Transparent HugePages 相關知識與關閉
最近遇到個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 theroot
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.
相關文章
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7Linux
- CAP 與 Raft 相關知識Raft
- [20191202]關於hugepages相關問題.txt
- .net相關知識
- Shell相關知識
- RPM相關知識
- SSL相關知識科普
- 音訊相關知識音訊
- Redis的相關知識Redis
- Elasticsearch——search相關知識Elasticsearch
- /proc的相關知識
- redis相關知識點Redis
- Git相關知識點Git
- Java與Mysql鎖相關知識總結JavaMySql
- React相關知識點:關於ReduxReactRedux
- 關於Python Number 相關的知識!Python
- 相機成像相關知識總結
- 【Java】容器相關知識點Java
- ivar layout 相關知識點
- WEB相關背景知識(新手)Web
- RTMP協議相關知識協議
- Vlan相關知識雜記
- CT校正相關知識整理
- LR模型相關知識點模型
- RMAN備份相關知識與技能總結
- How to disable transparent Hugepage (THP) on Red Hat Enterprise Linux 8?Linux
- 信管知識梳理(三)軟體工程相關知識軟體工程
- Android進階知識:Handler相關Android
- 資料結構相關知識資料結構
- Java容器相關知識點整理Java
- 總結 MySQL 相關知識點MySql
- wifi認證的相關知識WiFi
- 【雜談】FilterChain相關知識整理FilterAI
- 【詳解】WebSocket相關知識整理Web
- hadoop一些相關知識Hadoop
- 座標系相關知識科普
- 事務相關知識集錦
- JVM相關知識點總結JVM
- Elasticsearch叢集運維相關知識Elasticsearch運維