SUMMARY: IPC semaphores

From: Jonathan Williams (jonathw@shubertorg.com)
Date: Wed May 08 2002 - 11:02:51 EDT


Ok...I finally got the proper answer to my question. I apologize because I'm not sure I explained the problem correctly--some of the responses I got were just...odd. Anyway, a number of people gave me the info I need:

Gavin Kreuiter wrote:
sem-mns (on Tru64) is now called num-of-sems:

num-of-sems - type=INT op=CQ min_val=0 max_val=2147483647

sem-mni is the number of semaphore identifiers. Each identifier can utilise "num-of-sems" semaphores. Typically, a decent app will use ONE identifier, with as many semaphores as it needs associated with that identifier. It sounds like your app uses one sem per identifier.

The fact that the usage increases when the network is busy is worrying. Either each new process (of the app) uses its own semaphore (which would show a correspondence between number of processes and the number of semaphores), or the app has a bug whereby certain conditions result in a loop allocating more and more semaphores. I would suspect the latter. Is it possible to discuss this with the offending programmer? He/she is sure to be able to provide you with more relevant info.

I liked this response because of the snide programmer remarks...anyway I increased the num-of-sems as well as the sem-mni attributes. I know this will only buy us more time, but that's fine. I don't know the "offending programmer" hehe, but maybe we will contact Envoy (current owners of Xipc) to discuss this problem. Thanks for the help everyone.

Jonathan Williams
Unix Systems Administrator
The Shubert Organization, Inc.

  -----Original Message-----
  From: tru64-unix-managers-owner@ornl.gov [mailto:tru64-unix-managers-owner@ornl.gov]On Behalf Of Jonathan Williams
  Sent: Tuesday, May 07, 2002 7:35 PM
  To: Tru64 Mailing List
  Subject: IPC semaphores

  Ok, I don't really know anything about semaphores, but I do know that our system is running out of them. If we use ipcs to look at the semaphores it shows that 498 are in use, and the kernel is set to only use 512. We want to increase this number, but are unsure how to do this. We were told by Envoy to increase the size of the sem-mni and sem-mns values. So we looked into this, and are now even more confused. I can't find any reference to "sem_mns" anywhere--it's not in any of the man pages or in dxkerneltuner. So what is this attribute, and where do you change it? And the "sem-mni" attribute is set to 400 at boot time, but the current value is 512. Where did this current value come from? The /etc/sysconfigtab file says 400 as well. So I'm wondering if I increase the sem-mni to something else and boot it, will the 512 number come back? Also, what would be a good number to change it to?
  We don't usually have this many semaphores at all, only when we experience some sort of network issue, and then the semaphores go up. Any info would be great...I hope this makes some sort of sense to someone out there.
  BTW: system= ES45 Tru64 5.1a

  Jonathan Williams
  Unix Systems Administrator
  The Shubert Organization, Inc.



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:40 EDT