Oracle Linux 7禁用Transparent HugePages
Transparent HugePages記憶體在Red Hat企業Linux 6,SUSE 11和Oracle Linux 6的Oracle Linux Unbreakable Enterprise Kernel2(UEK2)早期版本中預設是啟用的。Transparent HugePages記憶體在Oracle Linux Unbreakable Enterprise Kernel2(UEK2)核心中預設情況下是禁用的。"tuned.service"在Oracle Linux7中預設是將transparent_hugepage設定為always。即使在grub核心命令列中它是禁用的,在boot時tuned service將被設定為'always'。在UEK3中預設情況下是禁用的。
Transparent HugePages可能會造成記憶體在執行時的延遲分配。為了避免效能問題,Oracle強烈建議對所有Oracle資料庫伺服器禁用Transparent HugePages。為了提高效能Oracle建議使用標準HugePages。
Transparent HugePages記憶體與標準HugePages記憶體的差異在於核心khugepaged執行緒在執行時動態分配記憶體。標準HugePages記憶體是在啟動時預先分配在執行時不會發生改變。
1.檢查Transparent HugePage是否被啟用
[root@oracle12c ~]# uname -r 3.10.0-123.el7.x86_64 [root@oracle12c ~]# cat /sys/kernel/mm/transparent_hugepage/enabled [always] madvise never ---這說明Transparent Hugepage被啟用
2.有兩種禁用Transparent HugePage的模式
2.1對吞吐效能方面全域性禁用Transparent HugePage
先對檔案/usr/lib/tuned/throughput-performance/tuned.conf進行備份
[root@oracle12c ~]# ls -lrt /usr/lib/tuned/throughput-performance/tuned.conf* -rw-r--r--. 1 root root 2050 May 7 2014 /usr/lib/tuned/throughput-performance/tuned.conf -rw-r--r--. 1 root root 2050 Mar 29 11:04 /usr/lib/tuned/throughput-performance/tuned.conf.bkp
[root@oracle12c ~]# more /usr/lib/tuned/throughput-performance/tuned.conf | grep "transparent_hugepages" transparent_hugepages=always
修改檔案/usr/lib/tuned/throughput-performance/tuned.conf,將其中的
[vm]
transparent_hugepages=always
修改為
[vm]
transparent_hugepages=never
[root@oracle12c ~]# more /usr/lib/tuned/throughput-performance/tuned.conf | grep "transparent_hugepages" transparent_hugepages=never
重啟作業系統來驗證修改結果
[root@oracle12c ~]# uname -r 3.10.0-123.el7.x86_64 [root@oracle12c ~]# cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never]
2.2.對正使用的調整概要檔案禁用Transparent HugePage
先識別正使用的調整概要檔案
[root@oracle12c ~]# tuned-adm active Current active profile: virtual-guest --這說明當前正使用的概要檔案是Virtual-guest
Virtual-guest profile是使用檔案/usr/lib/tuned/virtual-guest/tuned.conf,並且它包含了來自檔案/usr/lib/tuned/throughput-performance/tuned.conf中的"throughput-performance"。首先對檔案/usr/lib/tuned/virtual-guest/tuned.conf進行備份
[root@oracle12c ~]# cp /usr/lib/tuned/virtual-guest/tuned.conf /usr/lib/tuned/virtual-guest/tuned.conf.bkp [root@oracle12c ~]# ls -lrt /usr/lib/tuned/virtual-guest/tuned.conf* -rw-r--r--. 1 root root 697 Nov 6 2013 /usr/lib/tuned/virtual-guest/tuned.conf -rw-r--r--. 1 root root 697 Mar 29 11:26 /usr/lib/tuned/virtual-guest/tuned.conf.bkp
[root@oracle12c ~]# more /usr/lib/tuned/virtual-guest/tuned.conf # # tuned configuration # [main] include=throughput-performance [sysctl] # If a workload mostly uses anonymous memory and it hits this limit, the entire # working set is buffered for I/O, and any more write buffering would require # swapping, so it's time to throttle writes until I/O can catch up. Workloads # that mostly use file mappings may be able to use even higher values. # # The generator of dirty data starts writeback at this percentage (system default # is 20%) vm.dirty_ratio = 30 # Filesystem I/O is usually much more efficient than swapping, so try to keep # swapping low. It's usually safe to go even lower than this on systems with # server-grade storage. vm.swappiness = 30
向檔案/usr/lib/tuned/virtual-guest/tuned.conf中增加"transparent_hugepages=never"來禁用
Transparent HugePage
[root@oracle12c ~]# vi /usr/lib/tuned/virtual-guest/tuned.conf # # tuned configuration # [main] include=throughput-performance [vm] transparent_hugepages=never [sysctl] # If a workload mostly uses anonymous memory and it hits this limit, the entire # working set is buffered for I/O, and any more write buffering would require # swapping, so it's time to throttle writes until I/O can catch up. Workloads # that mostly use file mappings may be able to use even higher values. # # The generator of dirty data starts writeback at this percentage (system default # is 20%) vm.dirty_ratio = 30 # Filesystem I/O is usually much more efficient than swapping, so try to keep # swapping low. It's usually safe to go even lower than this on systems with # server-grade storage. vm.swappiness = 30
重啟作業系統來驗證結果
[root@oracle12c ~]# uname -r 3.10.0-123.el7.x86_64 [root@oracle12c ~]# cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-2071593/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7Linux
- THP Transparent HugePages 相關知識與關閉
- Linux 11G RAC啟用HugePages與AMM的禁用Linux
- 【TUNE_ORACLE】Oracle資料庫與HugePages(四)如何禁用透明大頁Oracle資料庫
- HugePages on LinuxLinux
- Linux HugepagesLinux
- 配置 HugePages for Oracle on Linux (x86-64)OracleLinux
- Linux Hugepages[轉]Linux
- linux上Oracle的sga(HugePages)分配問題LinuxOracle
- ID 361468.1 HugePages on Oracle Linux 64-bitOracleLinux
- HugePages on Oracle Linux 64-bit (Doc ID 361468.1)OracleLinux
- Linux 下配置 HugePagesLinux
- 【TUNE_ORACLE】Oracle資料庫與HugePages(二)HugePages配置和限制Oracle資料庫
- 【TUNE_ORACLE】Oracle資料庫與HugePages(一)HugePages概念和優勢Oracle資料庫
- linux配置大頁HugePagesLinux
- Linux Hugepages的使用(引用)Linux
- Oracle Transparent Data Encryption 透明加密(一)Oracle加密
- Oracle Transparent Data Encryption 透明加密(二)Oracle加密
- Oracle 之 配置HugePages記憶體Oracle記憶體
- Oracle Transparent GateWay connect to MYSQL fix BUGOracleGatewayMySql
- 【TUNE_ORACLE】Oracle資料庫與HugePages(三)HugePages常見問題和解決辦法Oracle資料庫
- Shell Script to Calculate Values Recommended Linux HugePagesLinux
- 【Linux】Linux7服務管理 OracleLinux7 關閉、禁用防火牆服務LinuxOracle防火牆
- Oracle Transparent Gateway for SQL Server安裝配置說明OracleGatewaySQLServer
- 使用oracle Transparent gateway 連線 sybase 資料庫OracleGateway資料庫
- oracle transparent gateway 10g配置注意事項OracleGateway
- linux大記憶體Hugepages最佳化Linux記憶體
- Linux HugePages /proc/meminfo輸出行的含義Linux
- Transparent Data Encryption (TDE) in Oracle 10g Database Release 2Oracle 10gDatabase
- 0927hugepages與nr_overcommit_hugepagesMIT
- Oracle Linux 7 修改 hostnameOracleLinux
- Oracle Linux 7配置vncserverOracleLinuxVNCServer
- HugePages詳解
- How to disable transparent Hugepage (THP) on Red Hat Enterprise Linux 8?Linux
- How to Change hostname in Oracle Linux 7OracleLinux
- 透明代理Transparent Proxy
- Linux中設定hugepages 在記憶體中 lock SGALinux記憶體
- Oracle Linux 7 Configure DNSOracleLinuxDNS