1833875 Members
1896 Online
110063 Solutions
New Discussion

viewing semaphore usage

 
SOLVED
Go to solution
Ben Dehner
Trusted Contributor

viewing semaphore usage

I have a system running 16 Oracle instances. I tried to start up another instance, and got the following message:

ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device

Apparently, a semget() call failed with ENOSPC. I had run out of semaphores.

Here's where I get confused. On this system (HPUX 11.11), semmni = 2600, and semmns = 3000. If I do ipcs -s, I see 74 semapohres, and glance likewise shows me 74 semaphores. This just doesn't add up. Where have all my semaphores gone, or what other parameter/resource am I exhausting? If I am near a threshold where I can't start up any more instances without re-configuring the kernel, is there some way (other than trial and error) to see what resource I need to increase?
Trust me, I know what I'm doing
4 REPLIES 4
Solution

Re: viewing semaphore usage

Ben,

Are you sure you're looking at the right column, cos I have a little workstation with 2 oracle databases on it and I'm using well over 100 semaphores.

Are you confusing semaphore sets (semmni) for which you see one line per set in 'ipcs -s' (that's what glance -t shows you as well), with individual semaphores (semmns), for which there can be up to 500 (IIRC) in a set. Individual semaphores you only see with 'ipcs -sa' - look at the NSEMS column.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Ben Dehner
Trusted Contributor

Re: viewing semaphore usage

Excuse me while I go bang my head against a wall. That is exactly it. If I sum up that NSEMS column, I see 2905 semaphores in use. Now I know what is hitting me.
Trust me, I know what I'm doing
Ben Dehner
Trusted Contributor

Re: viewing semaphore usage

See above. Thanks.
Trust me, I know what I'm doing
A. Clay Stephenson
Acclaimed Contributor

Re: viewing semaphore usage

Actually part of your confusion is not your fault because the man 2 shmget page is in error. It states that errno is set to ENOSPC when the maximum number of allowed sema4 identifiers is exceeded (semmni). That statement is certainly true but no mention is made if the system-wide maximum number of sema's (semmns) is exceeded. The SAM help for semmns does indicate that errno can be set to ENOSPC eventhough the semget man page does not. In any event, you really need to bump semmns up to something in the 32-64Ki range.

I'm going to open a support case about the man page.
If it ain't broke, I can fix that.