Database Fails To Start With Large Amounts Of Huge Pages Available..Or..”Where Did I Lost My Mind..”

When configuring HugePages for a database, it kept refusing to startup (since the parameter large pages=’only’ was set). There were more than enough HugePages free, as shown below:

$ cat /proc/meminfo |grep -i huge
HugePages_Total: 33040
HugePages_Free:  14127
HugePages_Rsvd:   1569
Hugepagesize:     2048 kB

When starting the database, this was visible in the alertlog:

****************** Large Pages Information *****************
Parameter use_large_pages = only

Large Pages unused system wide = 4366 (8732 MB) (alloc incr 4096 KB)
Large Pages configured system wide = 33040 (65 GB)
Large Page size = 2048 KB

  Failed to allocate shared global region with large pages, unix errno = 12.
  Aborting Instance startup.
  ORA-27137: unable to allocate Large Pages to create a shared memory segment

  Total Shared Global Region size is 360 MB. Increase the number of
  unused large pages to at least 180 (360 MB) to allocate 100% Shared Global
  Region with Large Pages.


Looking more closely:

Large Pages unused: 8732 MB
Increase the number of unused large pages to at least 180 (360 MB)

So, there is 8GB free, and STILL the HugePages needs an increment?


The issue is: the OS does not let Oracle (the user running the database) have the amount of memory it wants!

Adjust the parameter in the file /etc/security/limits.conf

oracle soft memlock 67665920
oracle hard memlock 67665920

The number you need should match with the total of the HugePages. Although the HugePages needs to be divided over more than just one database, making it the total amount of the set HugePages makes it more flexible to give one database more if needed.

To calculate the number of memlock: <amount_of_HugePagges>*512*2*1024.

Remember to

  • Run /sbin/sysctl -p
  • Create a new bash session (ie: log in again, or open new terminal) as the user oracle to take the new settings into account before starting the database.

About GemsOfProgramming

Beeing a previously enthusiastic Java programmer, I rolled into the Oracle Database Administration world. It turned out I got a knack for this, and since approx. 2000 I'm a full time DBA. My experiences touches lot of Oracle products like Forms and Reports 9/10, JDAPI, Application Server, Weblogic Fusion and of course: Oracle Enterprise Databases, JavaFX, Swing and other Java components.
This entry was posted in Technical Stuff and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.