Tuesday, November 12, 2013

Linux-x86_64 Error: 12: Cannot allocate memory

When you're trying to start the Oracle instance, you can get this error in following reasons.

The cause of appearing depends not only on the following:

1. Improper configuration of sga parameters.

2. /proc/sys/kernel/shmmax (max size of one shared memory segment in bytes) ;

3. /proc/sys/kernel/shmmni (max number of shared memory segments in the system) ;

4.  /proc/sys/kernel/shmall (max size of memory in 4kB pages which can be occupied by shared memory segments)

4. ulimit -[S|H]l kBs
max locked memory, can be set in /etc/security/limits.conf as
oracle  soft    memlock unlimited
oracle  hard    memlock unlimited

5. ulimit -[S|H]m kBs
max memory size, can be set in /etc/security/limits.conf as
oracle  soft    rss unlimited
oracle  hard    rss unlimited

...

But aslo it depends on the settings of
ulimit -[S|H]v kBs - virtual memory, which can be set in :
- /etc/sysconfig/ulimit (if exists, in SLES11 a hard limit is set to 80 percent of total memory, in SLES10 it's set to unlimited) ;
- .profile or similar files (for example, ulimit -H -v unlimited).

P.S. Don't forget to configure huge pages properly, if they're used.
P.P.S. Don't put much memory to SGA due to possible swapping/paging, although it depends on a task and application(s).

OSs SLES 10/11 x86_64 were used

No comments:

Post a Comment