The Oracle Database Appliance: ORA-27137: unable to allocate large pages to create a shared memory segment


On ODA Hugepages is activated by default.

For the deployment type “Oracle Enterprise Edition” (for single or active/passive configurations) the second node will not be correct configured.

This may be a problem:

>sqlplus / as sysdba 
 SQL*Plus: Release 11.2.0.3.0 Production on Sat Feb 16 00:43:20 2013
 Copyright (c) 1982, 2011, Oracle. All rights reserved.
 Connected to an idle instance.
 SQL> startup
 ORA-27137: unable to allocate large pages to create a shared memory segment
 Linux-x86_64 Error: 1: Operation not permitted
 SQL>

Per default at ODA 26000 Largepages (52000 MB) are configured:

>grep Huge /proc/meminfo 
 HugePages_Total: 26000
 HugePages_Free:  26000
 HugePages_Rsvd:  0
 HugePages_Surp: 0
 Hugepagesize: 2048 kB 

Here an Example:

Database SGA size Largepages
testdb1 20GB = 20GB * 1024 = 20480MB / 2MB (Hugepagesize) = 10240 Hugepages
testdb2 20GB = 20GB * 1024 = 20480MB / 2MB (Hugepagesize) = 10240 Hugepages
testdb3 10GB = 10GB * 1024 = 10240MB / 2MB (Hugepagesize) = 5120 Hugepages
testdb4 10GB = 10GB * 1024 = 10240MB / 2MB (Hugepagesize) = 5120 Hugepages
Sum: 60GB SGA == 30720 Largepages

The new calculated number must be added to /etc/sysctl.conf:

#vm.nr_hugepages=26000
vm.nr_hugepages=40000

Finally – as ROOT – execute sysctl -p to activate the new value.

Maybe you have to increase the memlock limits in /etc/security/limits.conf

4 thoughts on “The Oracle Database Appliance: ORA-27137: unable to allocate large pages to create a shared memory segment

  1. Thanks for sharing. Beware though, that if this is an ODA V1 with only 96GB RAM on each node, you’d only have 96GB-60GB-misc OS/GI/ASM=approx. 30GB left for PGA.
    Cheers
    Lars Bo

    • Correction! Actually as you’re allocating 80GB to HUGEPAGES (40000), you only have 96G-80G-misc=10-12GB for PGA (notice that PGA is not allocated out of HUGEPAGES…)
      /Lars Bo

      • Hi Lars,
        thx for your comment! yes you are right on oda v1 you should reduce your hugepages pool. But the size of the pool should always sized to your requirements.

        Rgds,
        Daniel

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s