Home

About Me Contact Me Oracle12cSIG(IOUG)
 
Home  :: Quick Tips

HugePages for Oracle databases

0 Comments

HugePages for Oracle databases:

 

HugePages is a feature of the Linux kernel which allows larger pages to manage memory as the alternative to the small 4KB pagesize

 

For 11.2.0.2 and further, the Oracle Database Server has added a new parameter that helps managing the HugePages for use by the database.

The initialization parameter that was added is USE_LARGE_PAGES.

 

USE_LARGE_PAGES = TRUE / FALSE / ONLY

TRUE  Specifies that the instance can use large pages if large pages are configured on the system

FALSE Specifies that the instance will not use large pages

ONLY   Specifies that the instance will fail to start if large pages cannot be used for the entire SGA memory.

 

Note in Oracle RAC Multiple instances can use different values

 

Automatic Memory Management (AMM) feature is incompatible with HugePages. AMM is default for 11g Database. You can be disabled AMM by setting the following initialization parameters to zero:

MEMORY_TARGET

MEMORY_MAX_TARGET

 

 

 

Steps for Configuring HugePages

 

Step 1: Set memlock user limit set in /etc/security/limits.conf file. Set the value (in KB) slightly smaller than installed RAM.There is no harm in setting this value larger than your SGA requirements

Step 2: Re-logon to the Oracle product owner account (e.g. 'oracle') and check the memlock limit

                ulimit -l

               

Step 3: Oracle Database 11g or later, the default database created uses the Automatic Memory Management (AMM) feature which is incompatible with HugePages. Disable AMM before proceeding. To disable, set the initialization parameters MEMORY_TARGET and MEMORY_MAX_TARGET to 0

Step 4: Run hugepages_settings.sh to calculate the recommended value for the vm.nr_hugepageskernel parameter while all your database instances are up (including ASM instances). Reference Document 401749.1

Step 5: Edit the file /etc/sysctl.conf and set the vm.nr_hugepages parameter there

                vm.nr_hugepages = calculated value

Step 6: Stop all the database instances and reboot the server

 

Key Benefits

 

  1. Larger Page Size and Less # of Pages: Default page size is 4K whereas the HugeTLB size is 2048K. That means the system would need to handle 512 times less pages.

  2. Reduced Page Table Walking:

  3. Less Overhead for Memory Operations: since there are less number of pages to work on, the possible bottleneck on page table access is clearly avoided.

  4. Less Memory Usage: From the Oracle Database perspective, with HugePages, the Linux kernel will use less memory to create page tables to maintain virtual to physical mappings for SGA address range, in comparison to regular size pages. This makes more memory to be available for process-private computations or PGA usage.

  5. No Swapping: We must avoid swapping to happen on Linux OS . HugePages are not swappable (whereas regular pages are).

  6. No 'kswapd' Operations: kswapd will get very busy if there is a very large area to be paged (i.e. 13 million page table entries for 50GB memory) and will use an incredible amount of CPU resource. When HugePages are used, kswapd is not involved in managing them. See also Document 361670.1

Posted on : 2/9/2016 by Anuj
 
Comments
No comment found.
 


Add Your Comments
 
Name :
Email :
Comments :

 

 
 
  Archives
 
  Recent Posts

Finding database home information in database
Posted on :   10/10/2017

Beginner to Exadata?
Posted on :   8/31/2017

IOUG Collaborate 17
Posted on :   3/25/2017

  Recent Comments
 

Home  |  About Me  |  Contact  |  Oracle12cSIG(IOUG)

All Rights Reserved 2013 Oracle-12c