Oracle USE_LARGE_PAGES初始化引數

尛樣兒發表於2013-05-22

        這篇文章討論Oracle資料庫初始化引數use_large_pages的使用。
SQL> show parameter use_large_pages

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
use_large_pages                      string
TRUE
        在11gR2版本的資料庫,use_large_pages的預設值是TRUE。

SQL> alter system set use_large_pages=xxx scope=spfile;
alter system set use_large_pages=xxx scope=spfile
*
第 1 行出現錯誤:
ORA-00096: 值 XXX 對引數 use_large_pages 無效, 它必須來自 FALSE, ONLY, AUTO,TRUE 之間
        use_large_pages可設定的值包括:FALSE,ONLY,AUTO,TRUE。

下面透過摘取官方文件討論ONLY和TRUE之間的區別:

5.1.9 Use Automatic Shared Memory Management and Avoid Memory Paging

For any systems with 4 GB or more memory, disable Automatic Memory Management by setting MEMORY_TARGET=0 and enable Automatic Shared Memory Management by setting SGA_TARGET.

The sum of SGA and PGA memory allocations on the database server should always be less than your system's physical memory, and conservatively should be less than 75% of total system memory. However, PGA_AGGREGATE_TARGET is not a hard limit, and for some Data Warehouse or reporting applications, the PGA memory can grow to be 3 X PGA_AGGREGATE_TARGET.

Monitor PGA memory and host-based memory utilization using Oracle Enterprise Manager, or by querying v$pgastat and operating systems statistics, to get an accurate understanding of memory utilization.

Avoid memory paging by adjusting the number of databases and applications, or reducing the allocated memory settings.

On Linux Operating systems it is recommended that you configure HugePages so that ASM and database instances can use it for their SGA.
在Linux作業系統推薦配置HugePages,以至於ASM和資料庫例項的SGA都能使用HugePage來提高效能。ASM例項的SGA同樣有必要使用HugePage來提高效能。 

HugePages is a feature integrated into the Linux kernel from release 2.6. This feature provides the alternative to the 4K page size providing bigger pages. Using HugePages has the benefit of saving memory resources by decreasing page table overhead while making sure the memory is not paged to disk. This contributes to faster overall memory performance. Next to this overall node stability will benefit from using HugePages.

Ensuring the entire SGA of a database instance is stored in HugePages can be accomplished by setting the init.ora parameter use_large_pages=only. Setting this parameter will ensure that an instance will start only when it can get all of its memory for SGA from HugePages. For this reason the settinguse_large_pages=only is recommended for database instances.
設定初始化引數中的use_large_pages=only能夠確保資料庫例項的整個SGA存放在HugePages中。設定這個引數將確保只有當資料庫例項的SGA從HugePages中獲得所有的記憶體才能被啟動。基於這個原因,use_large_pages=only是資料庫例項推薦的設定。

For ASM instances leave use_large_pages=true (the default value). This setting still ensures that HugePages are used when available, but also ensures that ASM as part of Grid Infrastructure starts when HugePages are not or insufficiently configured.
針對ASM例項,保留use_large_pages=true(預設值),這個設定確保在Hugepage活動的情況下仍然能夠使用,但是也確保當HugePages不活動或者沒有足夠配置的情況下,作為GI一部分的ASM能夠被啟動。

Use Automatic Shared Memory Management, as HugePages are not compatible with Automatic Memory Management.


--end--




來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-761692/,如需轉載,請註明出處,否則將追究法律責任。

相關文章