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

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle News

 Oracle Forum
 Class Catalog


 Our Staff
 Our Prices
 Help Wanted!

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 UNIX
 Oracle UNIX
 Linux
 Oracle Linux
 Monitoring
 Remote help

 Remote plans
 Remote
services
 Oracle C++
 Oracle Java
 Apache
 JDeveloper
 App Server

 Applications
 Oracle Forms
 Oracle Portal
 11i Upgrades
 SQL Server
 Oracle Concepts
 HTML-DB Tips
 Software Help

 Remote Help  
 Development  

 Implementation


 Financials Training
 Oracle 11i
 Oracle Apps 11i
 Oracle Workflow
 Oracle AR 11i Class
 Oracle AP 11i class
 Oracle GL 11i class
 Oracle HR 11i class
 Oracle FA 11i class
 11i Project Mgt
 11i procurement
 11i collections


 Oracle Posters
 Oracle Books

 Oracle Tuning Book
 Oracle RAC Book
 Oracle Security
 Easy Oracle Books
 Oracle Scripts
 SQL Server DBA
 SQL Design Patterns
 Ion
 Excel-DB   


 BC Oracle News


 Rednecks!
 Dress code
 Arabian Stallion

 Burleson Arabians
 Guide Horses
 Don Burleson Blog
 Golf & Travel


 Privacy Policy
 

 

 
 

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 MetaLink 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)

4MB

4MB

Linux x86-64 (AMD64, EM64T)

2MB

2MB

Linux Itanium (IA64)

256MB

256MB

IBM Power Based Linux (PPC64)

NA

16MB

IBM zSeries Based Linux

NA

NA

IBM S/390 Based Linux

NA

NA

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 MetaLink 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

    or

    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 cruise
 
 
 
Oracle performance tuning software
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

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 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.