Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







Using Linux Hugepages with Oracle

Oracle Tips by Burleson Consulting
November 10,  2008

The Linux operating system has some features that are far superior to Windows, and Linux is now being used on larger servers, many of which are supporting Oracle databases.

Important note:  Some experts DO NOT recommend using Automatic Shared Memory Management (AMM, e.g. setting memory_target) with Linux hugepages.  See MOSC note 749851.1 "HugePages and Oracle Database 11g Automatic Memory Management (AMM) on Linux".  Also see MOSC notes 361323.1 and 361468.1.

In sum, AMM is not compatible with Linux Hugepages.  Also, beware that AMM re-size operations can cripple Oracle performance in some cases.

Everyone is aware of the issues with 32-bit servers running Linux, and the fact that 64-bit Linux allows large RAM regions that are not possible in 32-bit.  However, there is one more little tweak that can be applied to either 32-bit or 64-bit Oracle servers and that is the use of HugePages.

There are couple of important benefits of HugePages have some very real benefits for Oracle systems.

  • First, the "real" page size increases to 2 meg, 50 times larger than the old 4k page sizes.

  • RAM allocated for Hugepages is fenced.  Unlike standard RAM allocated to the Oracle SGA and PGA, Hugepages RAM is resident and it cannot be paged out, and it's ineligible for swapping.

This Linux 2.6 kernel feature simply utilizes hugepages to reduce virtual memory I/O operations when working with lots of memory. Here are some documented limits for hugepages:

Hardware Platform

Kernel 2.4

Kernel 2.6

Linux x86 (IA32)



Linux x86-64 (AMD64, EM64T)



Linux Itanium (IA64)



IBM Power Based Linux (PPC64)



IBM zSeries Based Linux



IBM S/390 Based Linux



The process to enable huge pages is as follows:

  • X = grep Hugepagesize /proc/meminfo

  • Y = Largest (MB of all client SGA?s) * 1024

  • Z = # Huge Pages needed = Y / X

  • Set Huge Page Pool size

edit /etc/sysctl.con
vm.nr_hugepages = Z

  • Increase ulimit parameter memlock for oracle user

    • edit /etc/security/limits.conf

    • oracle soft   memlock          Y

    • oracle hard  memlock          Y

  • reboot

Many people with huge 64-bit Oracle servers increase their SGA size without implementing HugePages. The results have been well documented (see Oracle?s MOSC document id = 361670.1) where SGA sizes greater than 10GB have displayed decreases in performance. So as a general practice, always implement Huge Pages.

Riyaj Shamsudeen notes these steps for using hugepages in Oracle:

To setup HugePages, the following changes must be completed:

  1. Set the vm.nr_hugepages kernel parameter to a suitable value. In this case, we decided to use 12GB and set the parameter to 6144 (6144*2M=12GB). You can run:
    echo 6144 > /proc/sys/vm/nr_hugepages


    sysctl -w vm.nr_hugepages=6144

    Of course, you must make sure this set across reboots too.

  2. The oracle userid needs to be able to lock a greater amount of memory. So, /etc/securities/limits.conf must be updated to increase soft and hard memlock values for oracle userid.
    oracle          soft    memlock        12582912
    oracle          hard   memlock        12582912

After setting this up, we need to make sure that SGA is indeed using HugePages. The value, (HugePages_Total- HugePages_Free)*2MB will be the approximate size of SGA (or it will equal the shared memory segment shown in the output of ipcs -ma).

cat /proc/meminfo |grep HugePages
HugePages_Total:  6144
HugePages_Free:   1655 <-- Free pages are less than total pages.
Hugepagesize:     2048 kB




oracle dba poster

Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright ? 1996 -  2014

All rights reserved by Burleson

Oracle ? is the registered trademark of Oracle Corporation.