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