Operating System - Linux
1748130 Members
3686 Online
108758 Solutions
New Discussion юеВ

Re: Linux Error: 12: Cannot allocate memory

 
SOLVED
Go to solution
Maaz
Valued Contributor

Linux Error: 12: Cannot allocate memory

OS: SLES11 SP1 x86

# uname -r
2.6.32.19-0.3-pae #1 SMP

Oracle: 10gR2 standard edition 32 bit

Physical Memory: 6 GB
# free -m
total used free shared buffers cached
Mem: 5857 1806 4051 0 26 1577
-/+ buffers/cache: 202 5655
Swap: 12284 0 12284


Oracle was running until Mr DBA has increased the value of 'sga_max_size' to 2.5GB
SQL> startup
ORA-27102: out of memory
Linux Error: 12: Cannot allocate memory
Additional information: 1
Additional information: 2260998

following are the kernel parameters
# cat /proc/sys/kernel/shmmni
4096

# cat /proc/sys/kernel/shmmax
3294967296

# cat /proc/sys/kernel/shmall
1572864

# getconf PAGE_SIZE
4096

Please help/suggest

Regards
Maaz
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: Linux Error: 12: Cannot allocate memory

It's possible that you don't have enough contiguous RAM for the SGA.

Can "Mr DBA" decrease the 'sga_max_size' back down to its previous value and see if it starts?
Maaz
Valued Contributor

Re: Linux Error: 12: Cannot allocate memory

Hi Thanks Patrick Wallek for a quick help

>It's possible that you don't have enough
>contiguous RAM for the SGA.
I am sorry, I didnt got you. But what I can share with you is that, when Oracle was installed on this system, there was only 2 GB Physical Memory installed, and now we have added 4 GB, i,e 6 GB of Physical Memory.

>Can "Mr DBA" decrease the 'sga_max_size' back
>down to its previous value and see if it
>starts?
yes, when sga_max_size sets to 1 GB it works/starts

Regards
Maaz
Tim Nelson
Honored Contributor

Re: Linux Error: 12: Cannot allocate memory

df /dev/shm ??

Maaz
Valued Contributor

Re: Linux Error: 12: Cannot allocate memory

Hi Thanks Time Nelson

# df /dev/shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 2999164 100 2999064 1% /dev/shm

# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext3 123G 9.6G 107G 9% /
devtmpfs devtmpfs 2.9G 108K 2.9G 1% /dev
tmpfs tmpfs 2.9G 100K 2.9G 1% /dev/shm
/dev/drbd0 ext3 197G 13G 175G 7% /opt/oracle


Thanks
Regards
Maaz
Huc_1
Honored Contributor
Solution

Re: Linux Error: 12: Cannot allocate memory

I do not know much about this version of Oracle and do not have an environment to test any of this but googeling I found a few pointer that said

On 32-bit Linux the total SGA size is limited to around 2Gig (Some say 1.7 Gig)

the following link is a little more explicit

http://www.oracle-base.com/articles/linux/LargeSGAOnLinux.php

I do not know if this is correct, but perhap worth investigating !

Enjoy, life.

Jean-Pierre Huc

Smile I will feel the difference
Maaz
Valued Contributor

Re: Linux Error: 12: Cannot allocate memory

Hi Jean-Pierre Huc
Thanks for sharing I'll try following the url

and for your kind consideration


# ipcs -lm

------ Shared Memory Limits --------

max number of segments = 4096

max seg size (kbytes) = 3217741

max total shared memory (kbytes) = 6291456

min seg size (bytes) = 1

Regards
Maaz
Maaz
Valued Contributor

Re: Linux Error: 12: Cannot allocate memory

Hi Tim Nelson
>df /dev/shm ??


Hi Huc
>On 32-bit Linux the total SGA size is
>limited to around 2Gig (Some say 1.7 Gig)
>the following link is a little more explicit

>http://www.oracle-base.com/articles/linux/LargeSGAOnLinux.php

Thanks everybody, and esp Tim Nelson, and Huc

I append the following line in the fstab, and issue resolved

tmpfs /dev/shm tmpfs size=5g 0 0

Thanks
Maaz