I feel obliged to point out that this blog post is roughly 5 years and 1 month old. People change, opinions evolve. In just a few years, vast technological landscapes can shift. And don't get me started on config files. Please consider this text in the context of its time.

Recently a customer observed on one of their systems that the first n databases started quite nicely on a system. However when they tried to start database n+1 on it, it just yielded the following error message.

SQL> startup
ORA-27125: unable to create shared memory segment
SVR4 Error: 28: No space left on device

Your first reflex is to check the amount of free shared memory, but the system had ample of it free. My first reflex after seeing an unlimited ZFS ARC was that we simply ran out of memory and that the customer should limit that first. However then I remembered there is a second resource that creates this error message as well. It’s the number of shared memory IDs. You have to check them as well. Per default they are limited to 128.

$ prctl -n project.max-shm-ids -i process $$
process: 4457: -ksh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-ids
        privileged        128       -   deny                                 -
        system          16.8M     max   deny   

I suggested to increase this number significantly.

# projmod -A -s -K "project.max-shm-ids=(privileged,1024,deny)" user.oracle

Let’s check the situation again.

$ prctl -n project.max-shm-ids -i process $$
process: 16382: -ksh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-ids
       privileged      1.02K       -   deny                                 -
       system          16.8M     max   deny  

After this, the database n+1 started without any problem.

Written by

Joerg Moellenkamp

Grey-haired, sometimes grey-bearded Windows dismissing Unix guy.