Ask The Real Tom

July 29, 2010



Set lock_sga to true on Linux (SLES)

Filed under: oracle,Uncategorized — Tags: , , — admin @ 1:01 pm

To lock the SGA into physical memory you have to set the lock_sga parameter to true.

Usually you get following Error message.

SQL> startup
SQL> ORA-27102: out of memory
Linux-x86_64 Error: 12: Cannot allocate memory

The problem it ulimit -l
You have to set it in /etc/security/limits.conf and relogon to the system and restart database.

cat /etc/security/limits.conf
...
oracle soft memlock unlimited
oracle hard memlock unlimited


alter system set lock_sga=true scope=spfile;
shutdown immediate
startup

And you SGA stays in physical memory.

If you SGA gets pages out you will encounter following waits.
Wait Event: latch: shared pool

July 28, 2010



ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device

Problem:


SQL> startup nomount
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device

There are 64G physical memoray avaliable.
shmmax is set to 52G
But still its not possibel to start the Oracle instance with more than 30G SGA.

Solution:

kernel.shmall is set to small.


cat /proc/sys/kernel/shmall
8248733
getconf PAGE_SIZE
4096

This means that only 8248733 memory pages can be allocate.
4096 x 8248733 = 32G

To allocate 50G we need to set shmall to at least 13107200

Powered by WordPress