<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Short note on KGX Mutexes</title>
	<atom:link href="http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=short-note-on-kgx-mutexes</link>
	<description>Oracle, Exadata, Performance, Troubleshooting - Mobile Life and Productivity.</description>
	<lastBuildDate>Wed, 08 Feb 2012 08:03:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Amir Riaz</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-5735</link>
		<dc:creator>Amir Riaz</dc:creator>
		<pubDate>Sun, 21 Nov 2010 19:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-5735</guid>
		<description>excellent</description>
		<content:encoded><![CDATA[<p>excellent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricardo</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-1415</link>
		<dc:creator>Ricardo</dc:creator>
		<pubDate>Mon, 20 Apr 2009 17:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-1415</guid>
		<description>Thank you Tanel!

  you are right (as ever ;)) Now I´m studying your notes (presentations) on the web and posts by you in forums about mutex. 

 Please, If you can correct me :))
 
  If I have created a new child which doesn´t exist, it´s necessary to scan the child list getting the right latch which protects the chain and scan the list (the kksfbc function I think). But, is there a mutex which too protects this chain?. If there is a mutex, is this mutex (for the chain) adquired in exclusive mode?

 If the child cursor doesn´t exist it is necessary to create it, but , is the parent cursor (its particular mutex) adquired in exclusive mode?. In other words, when a new child is created,  is the parent cursor mutex adquired in exclusive mode?. 

 Then, a new child is created,ok. Is there when the mutex ref count gets incremented?.

  Imagine the child exists now. Is still necessary to adquire the parent cursor mutex in exclusive mode? or simply kksfbc scans the list, find it and increase the ref count.

 On the other hand, as I have understood too pin/unpin operations are only required to increase/decrease the ref count but not to allocate or to create a new child cursor. Is this right?.

 The cursor s pin wait on x appears when buffer cache and shared pool exchange memory in my system. I think that this is not the problem but the consequence of a hidden problem. Using your helpful script for mutex I could see a sentence with lot of sleeps. When querying this sentence through sql_id I could see many invalidations and child cursors. My hypotesis is that these sentences (among others with the same problem), have many child cursors not shared, the library cache increases, the shared pool increases -&gt; there is not sufficient memory, and an exchange from different pools occurs. If there is not sufficient memory from other pools the massive reparsing for all the child cursor produces the cursor s pin wait on x.

 Tanel, sorry for all these questions. I hope you can help me ...

  Thank you Tanel!</description>
		<content:encoded><![CDATA[<p>Thank you Tanel!</p>
<p>  you are right (as ever ;)) Now I´m studying your notes (presentations) on the web and posts by you in forums about mutex. </p>
<p> Please, If you can correct me :))</p>
<p>  If I have created a new child which doesn´t exist, it´s necessary to scan the child list getting the right latch which protects the chain and scan the list (the kksfbc function I think). But, is there a mutex which too protects this chain?. If there is a mutex, is this mutex (for the chain) adquired in exclusive mode?</p>
<p> If the child cursor doesn´t exist it is necessary to create it, but , is the parent cursor (its particular mutex) adquired in exclusive mode?. In other words, when a new child is created,  is the parent cursor mutex adquired in exclusive mode?. </p>
<p> Then, a new child is created,ok. Is there when the mutex ref count gets incremented?.</p>
<p>  Imagine the child exists now. Is still necessary to adquire the parent cursor mutex in exclusive mode? or simply kksfbc scans the list, find it and increase the ref count.</p>
<p> On the other hand, as I have understood too pin/unpin operations are only required to increase/decrease the ref count but not to allocate or to create a new child cursor. Is this right?.</p>
<p> The cursor s pin wait on x appears when buffer cache and shared pool exchange memory in my system. I think that this is not the problem but the consequence of a hidden problem. Using your helpful script for mutex I could see a sentence with lot of sleeps. When querying this sentence through sql_id I could see many invalidations and child cursors. My hypotesis is that these sentences (among others with the same problem), have many child cursors not shared, the library cache increases, the shared pool increases -&gt; there is not sufficient memory, and an exchange from different pools occurs. If there is not sufficient memory from other pools the massive reparsing for all the child cursor produces the cursor s pin wait on x.</p>
<p> Tanel, sorry for all these questions. I hope you can help me &#8230;</p>
<p>  Thank you Tanel!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-1396</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Thu, 16 Apr 2009 11:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-1396</guid>
		<description>Hi Ricardo,

Looks like the systemstate dump crashes the target process (or the target process is so stuck somehow that it&#039;s unable to handle the oradebug&#039;s SIGUSR2 signal). This is when you get the &quot;not active&quot; messasge.

Try systemstate dump with a lower level or hanganalyze. Also, v$mutex_sleep (idn) would give you the hash value of object waited for (which you can map to x$kglob to find the object name involved in hang)</description>
		<content:encoded><![CDATA[<p>Hi Ricardo,</p>
<p>Looks like the systemstate dump crashes the target process (or the target process is so stuck somehow that it&#8217;s unable to handle the oradebug&#8217;s SIGUSR2 signal). This is when you get the &#8220;not active&#8221; messasge.</p>
<p>Try systemstate dump with a lower level or hanganalyze. Also, v$mutex_sleep (idn) would give you the hash value of object waited for (which you can map to x$kglob to find the object name involved in hang)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricardo</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-1393</link>
		<dc:creator>Ricardo</dc:creator>
		<pubDate>Wed, 15 Apr 2009 08:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-1393</guid>
		<description>Hi Tanel,

Recently I am getting into a problem due to pin S wait on X in a two-node HP RAC environment (10.2.0.3) . When I´m trying a systemdump and execute:
oradebug setorapid ...

suddenly the wait which has stayed for several seconds (&gt;7000) disappears with the message: ORA-00072: process &quot;28722&quot; is not active.

What could be the reason for this?  

  Best regards Tanel.</description>
		<content:encoded><![CDATA[<p>Hi Tanel,</p>
<p>Recently I am getting into a problem due to pin S wait on X in a two-node HP RAC environment (10.2.0.3) . When I´m trying a systemdump and execute:<br />
oradebug setorapid &#8230;</p>
<p>suddenly the wait which has stayed for several seconds (&gt;7000) disappears with the message: ORA-00072: process &#8220;28722&#8243; is not active.</p>
<p>What could be the reason for this?  </p>
<p>  Best regards Tanel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Latches, Spinning and Queues &#171; I&#8217;m just a simple DBA on a complex production system</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-823</link>
		<dc:creator>Latches, Spinning and Queues &#171; I&#8217;m just a simple DBA on a complex production system</dc:creator>
		<pubDate>Tue, 20 Jan 2009 04:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-823</guid>
		<description>[...] Mutexes are best covered by Tanel Poder.  They are even smaller and faster to take than latches, they also work as a cursor pin (signifying shared or exclusive ownership of a cursor), and they give you even less information about who is waiting for what and for how long. You have information about sleep times, but not number of requests and misses.  &#160; [...]</description>
		<content:encoded><![CDATA[<p>[...] Mutexes are best covered by Tanel Poder.  They are even smaller and faster to take than latches, they also work as a cursor pin (signifying shared or exclusive ownership of a cursor), and they give you even less information about who is waiting for what and for how long. You have information about sleep times, but not number of requests and misses.  &nbsp; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Concurrency &#171; Oracle Scratchpad</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-807</link>
		<dc:creator>Concurrency &#171; Oracle Scratchpad</dc:creator>
		<pubDate>Fri, 16 Jan 2009 19:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-807</guid>
		<description>[...] 10.2, Oracle introduced their &#8220;mutex&#8221; mechanism to the library cache to reduce the contention and allow increased concurrency in the [...]</description>
		<content:encoded><![CDATA[<p>[...] 10.2, Oracle introduced their &#8220;mutex&#8221; mechanism to the library cache to reduce the contention and allow increased concurrency in the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: heliodias</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-416</link>
		<dc:creator>heliodias</dc:creator>
		<pubDate>Sun, 13 Jul 2008 02:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-416</guid>
		<description>Hi Tanel,
Very good this post,
Can you please indicate where can i learn more about it?

And do you know what is the impact of _kks_use_mutex_pin on shared pool?

Thanks
Helio Dias</description>
		<content:encoded><![CDATA[<p>Hi Tanel,<br />
Very good this post,<br />
Can you please indicate where can i learn more about it?</p>
<p>And do you know what is the impact of _kks_use_mutex_pin on shared pool?</p>
<p>Thanks<br />
Helio Dias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-415</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Wed, 02 Jul 2008 13:33:27 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-415</guid>
		<description>Thanks Alex,

Oracle&#039;s internal mutexes which are used for library cache cursor pinning are just memory structures in Oracle&#039;s SGA (like latches, but smaller). Mutex taking is done using an atomic compare-and-swap (or like) operation and mutex release is just a decrement of the mutex value as far as I know.

They are different from OS mutexes as OS mutexes live in OS kernel space and require a system call for access, but Oracle mutexes live in SGA and do not require syscall, instead just a memory line update.</description>
		<content:encoded><![CDATA[<p>Thanks Alex,</p>
<p>Oracle&#8217;s internal mutexes which are used for library cache cursor pinning are just memory structures in Oracle&#8217;s SGA (like latches, but smaller). Mutex taking is done using an atomic compare-and-swap (or like) operation and mutex release is just a decrement of the mutex value as far as I know.</p>
<p>They are different from OS mutexes as OS mutexes live in OS kernel space and require a system call for access, but Oracle mutexes live in SGA and do not require syscall, instead just a memory line update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://blog.tanelpoder.com/2008/06/12/short-note-on-kgx-mutexes/comment-page-1/#comment-414</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 02 Jul 2008 09:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2008/06/12/short-note-on-kgx-mutexes/#comment-414</guid>
		<description>Hi, Tanel. Great blog!

Can you please explain how mutexes  maintained on OS level.
If i am not wrong, latch - it is a semaphore in OS. And mutex?</description>
		<content:encoded><![CDATA[<p>Hi, Tanel. Great blog!</p>
<p>Can you please explain how mutexes  maintained on OS level.<br />
If i am not wrong, latch &#8211; it is a semaphore in OS. And mutex?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

