<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Semaphore question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815020#M269022</link>
    <description>It's difficult to make much of these statistics without putting them into context (ie, the design of a given application). If one process (or thread) is blocked on a semaphore it generally means that it is waiting for some action to be completed or some result to be computed by another process (or thread) before it can proceed.&lt;BR /&gt;In short, blocking on a sema4 can be a perfectly normal thing and no amount of changing kernel tunables will help in that case. Depending upon the application design, you might see Process A blocking on a sema4 but what it is really doing is waiting for Process B to complete some task (possibly i/o bound) and set the semaphore to tell Process A to proceed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 29 Jun 2006 09:28:57 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2006-06-29T09:28:57Z</dc:date>
    <item>
      <title>Semaphore question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815017#M269019</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;We are having performance issues on our HPUX 11iV1 system.  It is a 32-way dome with plenty of memory.&lt;BR /&gt;We are seeing unexplainable load spikes and we are working with the software vendor to try to find the cause.&lt;BR /&gt;We have been told that we should be monitoring the semaphore utilization.  Using MWA, we have collected the following data on Semaphore Wait% and Time.  We have determined that the wait % does not correlate to the wait time.  The high values that we are seeing are happening during extended periods of very high load.&lt;BR /&gt;I am looking for an explanation of what I am seeing with these high semaphore time spikes.&lt;BR /&gt;Our semmni and semmns are both set at 3072.&lt;BR /&gt;&lt;BR /&gt;The data is consolidated from a long time period.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Craig&lt;BR /&gt;&lt;BR /&gt;Here is the data:&lt;BR /&gt;&lt;BR /&gt; Sem  ;    Sem    ;&lt;BR /&gt;Wait %;  WaitTm   ;&lt;BR /&gt;   0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt; 10.31;  33856.691;&lt;BR /&gt;  1.16;   3771.003;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.13;     35.777;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.56;    142.137;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  7.47;   2030.291;&lt;BR /&gt;  3.03;      0.120;&lt;BR /&gt;  1.48;    310.002;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  6.98;   1752.705;&lt;BR /&gt;  1.56;    346.436;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.36;     91.137;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt; 44.11;  10705.630;&lt;BR /&gt; 14.59;   3770.927;&lt;BR /&gt;  0.00;      0.000;&lt;BR /&gt;  0.00;      0.000;</description>
      <pubDate>Thu, 29 Jun 2006 08:59:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815017#M269019</guid>
      <dc:creator>Craig A. Sharp</dc:creator>
      <dc:date>2006-06-29T08:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Semaphore question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815018#M269020</link>
      <description>Craig, a semaphore can be thought of a handle to a lock.  So, a lock is being thrown while you wait for some update operation to take place, and you've got process(es) waiting for their turn at the locked resource (in a file).&lt;BR /&gt;&lt;BR /&gt;If you look in the database and do a latch analysis, you'll see a similar problem (latch waits).  &lt;BR /&gt;&lt;BR /&gt;It's pretty simple, you've got busy areas in your database with a lot of contention for that resource.  You'll need to find it and identify it.&lt;BR /&gt;&lt;BR /&gt;I'd start with a statspack analysis from Oracle, and begin looking for the top code being called, on two fronts - total time running, and total number of executions.  Your problem code is probably somewhere in there, and it probably needs tuning.&lt;BR /&gt;&lt;BR /&gt;If you find it's tuned (it's probably not... just programs in general), then you've got to start looking at how the data is being striped across the data areas.  You should look into making sure the data involved in the above criteria (run time and execution time) is striped across a good many database files.  Also all tables and (hopefully) indexes involved should have their "inittrans" levels set high enough to keep the latch contention levels low.  If it's a busy table, a rough guess would be to start at 12 (vs default of 2) and work your way up from there.&lt;BR /&gt;&lt;BR /&gt;Anyway, you've got database tuning to do.</description>
      <pubDate>Thu, 29 Jun 2006 09:11:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815018#M269020</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2006-06-29T09:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Semaphore question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815019#M269021</link>
      <description>Oh, I (for some reason) just assumed that you're using Oracle for some of what I've told you.  But, if you're using another database (Sybase, Informix, MySql) - your problem is still basically the same.</description>
      <pubDate>Thu, 29 Jun 2006 09:13:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815019#M269021</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2006-06-29T09:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Semaphore question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815020#M269022</link>
      <description>It's difficult to make much of these statistics without putting them into context (ie, the design of a given application). If one process (or thread) is blocked on a semaphore it generally means that it is waiting for some action to be completed or some result to be computed by another process (or thread) before it can proceed.&lt;BR /&gt;In short, blocking on a sema4 can be a perfectly normal thing and no amount of changing kernel tunables will help in that case. Depending upon the application design, you might see Process A blocking on a sema4 but what it is really doing is waiting for Process B to complete some task (possibly i/o bound) and set the semaphore to tell Process A to proceed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jun 2006 09:28:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815020#M269022</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-06-29T09:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Semaphore question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815021#M269023</link>
      <description>Any thoughts as to why the 'wait %' and the 'wait time' each do not correlate with the interval time as seen by MWA ?  We are seeing the same manifestation for a number of processes running under 11.11.   As an example, MWA tells me that INTERVAL ( measured in seconds) for PROCESS A is 60.  The PROC_THREAD_COUNT is 1, PROC_SEM_WAIT_PCT is 0.09 ( is this actually the ratio, or .09 of 1% ? ), and PROC_SEM_WAIT_TIME is 302.897 seconds</description>
      <pubDate>Thu, 27 Jul 2006 09:35:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semaphore-question/m-p/3815021#M269023</guid>
      <dc:creator>Howard L. Curtis</dc:creator>
      <dc:date>2006-07-27T09:35:31Z</dc:date>
    </item>
  </channel>
</rss>

