From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jonathan Williams Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: IPC semaphores Date: Wed, 08 May 2002 11:02:51 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <011601c1f6a1$6cfdbb60$8315000a@shubertorg.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0113_01C1F67F.E571E250" X-Trace: main.gmane.org 1020870171 26608 127.0.0.1 (8 May 2002 15:02:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 May 2002 15:02:51 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 175Sxv-0006v2-00 for ; Wed, 08 May 2002 17:02:51 +0200 Original-Received: (qmail 24993 invoked by uid 5); 8 May 2002 15:02:53 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 24985 invoked from network); 8 May 2002 15:02:53 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (134.167.3.119) by 0 with SMTP; 8 May 2002 15:02:53 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1 #39060) with ESMTP id <0GVS00DAYSGTKX@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 08 May 2002 11:02:53 -0400 (EDT) Original-Received: from mailhost.Shubertorg.com ([207.246.208.40]) by emroute1.cind.ornl.gov (PMDF V6.1 #39060) with ESMTP id <0GVS00410SGQJ3@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 08 May 2002 11:02:51 -0400 (EDT) Original-Received: from memnoch [207.238.217.205] by mailhost.Shubertorg.com (SMTPD32-7.07) id A0027CD00E0; Wed, 08 May 2002 11:10:58 -0400 Original-To: Tru64 Mailing List X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-Priority: 3 X-MSMail-priority: Normal Xref: main.gmane.org gmane.os.tru64.managers:104 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:104 This is a multi-part message in MIME format. ------=_NextPart_000_0113_01C1F67F.E571E250 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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=3DINT op=3DCQ min_val=3D0 max_val=3D2147483647 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.=20 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? =20 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.=20 BTW: system=3D ES45 Tru64 5.1a Jonathan Williams Unix Systems Administrator The Shubert Organization, Inc. ------=_NextPart_000_0113_01C1F67F.E571E250 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Ok...I finally got the proper answer to = my=20 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=20 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=3DINT op=3DCQ min_val=3D0=20 max_val=3D2147483647
 
sem-mni is the number of semaphore identifiers.  Each = identifier can=20 utilise "num-of-sems" semaphores.  Typically, a decent app will use = ONE=20 identifier, with as many semaphores as it needs associated with that=20 identifier.  It sounds like your app uses one sem per=20 identifier.
 
The=20 fact that the usage increases when the network is busy is = worrying.  Either=20 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=20 app has a bug whereby certain conditions result in a loop allocating = more and=20 more semaphores.  I would suspect the latter.  Is it possible = to=20 discuss this with the offending programmer?  He/she is sure to be = able to=20 provide you with more relevant info.
 
I = liked this=20 response because of the snide programmer remarks...anyway  I = increased the=20 num-of-sems as well as the sem-mni attributes.  I know this will = only buy=20 us more time, but that's fine.  I don't know the "offending = programmer"=20 hehe, but maybe we will contact Envoy (current owners of Xipc) to = discuss this=20 problem.  Thanks for the help everyone.
 
Jonathan Williams
Unix Systems=20 Administrator
The Shubert Organization, Inc.
 
-----Original Message-----
From:=20 tru64-unix-managers-owner@ornl.gov=20 [mailto:tru64-unix-managers-owner@ornl.gov]On Behalf Of = Jonathan=20 Williams
Sent: Tuesday, May 07, 2002 7:35 PM
To: = Tru64=20 Mailing List
Subject: IPC semaphores

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

Jonathan Williams
Unix Systems = Administrator
The Shubert Organization,=20 Inc.
------=_NextPart_000_0113_01C1F67F.E571E250--