I have a powerful machine with 70 GB RAM. How many Oracle instances with 20 GB can be created

oracleoracle-11g-r2

I have powerful machine with 70 GB RAM. I created one Oracle instance with 20 GB as sga_target. I am not able to create another Oracle instance with sga_target > 10G even when I keep the first database down. If I set sga_target >=10G it gives below error on startup:

ORA-27104: system-defined limits for shared memory was misconfigured

While free -m shows that there is enough memeory available though:

             total       used       free     shared    buffers     cached
Mem:         72419      34490      37928          0        618      28159
-/+ buffers/cache:       5711      66707
Swap:         2047          0       2047

Do I need to increase swap space? Any pointer in this regard is highly appreciated.

Also for 70 GB memory, for creating many instances, what would be best value for swap space – is there some way to caluculate this? My objective is to have at least two instances each with sga_target=20G and will keep only one instance up at a time. If I am missing any concept here?

Output of ipcs -im is as below

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 4194303
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

Best Answer

Your kernel parameters need modifying.

Edit /etc/sysctl.conf and ensure the following lines are present:

kernel.shmall = 18350080
kernel.shmmax = 75161927680
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128

Then reboot the machine.