10

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
0

3 Answers 3

13

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.

4
  • Thanks this works. Could you please let me know how could you decide these values for shmall, shmax and shmni etc. Is there some way to calculate these?
    – user419534
    May 3, 2012 at 10:47
  • 3
    shmmax is the max size in bytes of a single shared memory segment, you have 70Gb of RAM so I used 70*1024*1024*1024. shmall is the maximum sum of all shared memory segments that can exist at once & is measured in pages. The page size on Linux is usually 4k, so I divided the shmmax number by 4096.
    – Philᵀᴹ
    May 3, 2012 at 10:50
  • Hi @Philᵀᴹ are there equivalent settings for Windows? More specifically in my case I'm running a Windows Docker container and am seeing the ORA-27104 message.
    – TrojanName
    Feb 28 at 13:41
  • Nevermind, it turns out that you have to explicitly tell docker build to use extra memory by passing the "-m 8G -f Dockerfile" flags. You may also need to set your WSL memory limits in a .wslconfig file and restart WSL and Docker.
    – TrojanName
    Mar 1 at 12:15
6

The kernel paramter should be configured properly:

Oracle Database Installation Guide, 11g Release 2 (11.2) for Linux, Part Number E24321-04, 2.10 Configuring Kernel Parameters for Linux ,

0

Setting shmmax value depends on the whether the OS is 32-Bit or 64-Bit. There is a metalink note which explain about this in detail.

Maximum SHMMAX values for Linux x86 and x86-64 [ID 567506.1]

Please have a look.

There is also a note about Shared Memory/Semaphores for Oracle which should be an interesting read.

TECH: Unix Semaphores and Shared Memory Explained [ID 15566.1]

Regards, Nagendra Chillale

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.