<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: CPU usage</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Thu, 23 May 2013 12:47:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Faulty Quotes 6 &#8211; CPU Utilization &#171; Charles Hooper&#39;s Oracle Notes</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-35400</link>
		<dc:creator><![CDATA[Faulty Quotes 6 &#8211; CPU Utilization &#171; Charles Hooper&#39;s Oracle Notes]]></dc:creator>
		<pubDate>Fri, 05 Feb 2010 06:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-35400</guid>
		<description><![CDATA[[...] &#8220;First: check the following simple example of how wrong you can be in saying {&#8216;using&#8217; all of your CPU is a good thing} especially in a multi-user, shared [...]]]></description>
		<content:encoded><![CDATA[<p>[...] &#8220;First: check the following simple example of how wrong you can be in saying {&#8216;using&#8217; all of your CPU is a good thing} especially in a multi-user, shared [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CPU used &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-33158</link>
		<dc:creator><![CDATA[CPU used &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Tue, 26 May 2009 11:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-33158</guid>
		<description><![CDATA[[...] (new style)) by executing a long-running, CPU-intensive query (such as the code from my &#8220;kill CPU&#8221; routine) in one session, then monitoring it from [...]]]></description>
		<content:encoded><![CDATA[<p>[...] (new style)) by executing a long-running, CPU-intensive query (such as the code from my &#8220;kill CPU&#8221; routine) in one session, then monitoring it from [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevinclosson</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31056</link>
		<dc:creator><![CDATA[kevinclosson]]></dc:creator>
		<pubDate>Thu, 15 May 2008 18:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31056</guid>
		<description><![CDATA[Jonathan,

  You are right...I flubbed the alter session set “_old_connect_by_enabled” = true...

  With that in place I see 45.9 with a single stream and two-streams-same-table
  come in at 57.2/57.4

  As for the variant kslget implementations (e.g., t,t&amp;s versus compare and swap) really
  don&#039;t make that much difference. In both cases they are looped and susceptible to
  external interference such as interrupts in the control code (loop). These simple
  spinlocks (latch) make too many presumptions such as the notion that the HOLDER of the 
  lock is actually on a CPU or that allowing any interested party to acquire the lock 
  is the best for the overall system...but, in the end, they do work pretty well with
  today&#039;s hardware...I suspect they&#039;ll deserve a closer look as core count goes to 8 and
  beyond though]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>  You are right&#8230;I flubbed the alter session set “_old_connect_by_enabled” = true&#8230;</p>
<p>  With that in place I see 45.9 with a single stream and two-streams-same-table<br />
  come in at 57.2/57.4</p>
<p>  As for the variant kslget implementations (e.g., t,t&amp;s versus compare and swap) really<br />
  don&#8217;t make that much difference. In both cases they are looped and susceptible to<br />
  external interference such as interrupts in the control code (loop). These simple<br />
  spinlocks (latch) make too many presumptions such as the notion that the HOLDER of the<br />
  lock is actually on a CPU or that allowing any interested party to acquire the lock<br />
  is the best for the overall system&#8230;but, in the end, they do work pretty well with<br />
  today&#8217;s hardware&#8230;I suspect they&#8217;ll deserve a closer look as core count goes to 8 and<br />
  beyond though</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31055</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 15 May 2008 18:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31055</guid>
		<description><![CDATA[Amit,

Nice thought. I don&#039;t know the answer, but I don&#039;t believe that Oracle uses mutexes on buffer headers.]]></description>
		<content:encoded><![CDATA[<p>Amit,</p>
<p>Nice thought. I don&#8217;t know the answer, but I don&#8217;t believe that Oracle uses mutexes on buffer headers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31035</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 14 May 2008 09:36:27 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31035</guid>
		<description><![CDATA[Kevin,
Trying to eliminate a few options - I ran up the same test on my old RAC stack (using 10.2.0.1 linked in single-instance mode) under the Linux that was the one that the Oracle &quot;build your own RAC&quot; was keen on a couple of years ago. (A clone of Redhat 4.2, I think).

Intel 830 (Pentium 4) running at 2.1Ghz with 1Mb L2 cache I think, and DDR2 memory clocked at 533MHz (in case that&#039;s significant)

&lt;blockquote&gt;
Single run:  68 CPU seconds.
Two runs against same table:  90 / 92 CPU seconds (7.6M latch misses).
Running against two tables: 74 / 77 CPU seconds. (No latch anomalies)
&lt;/blockquote&gt;

I&#039;m not keen on the variation, between concurrent runs  - I&#039;d have to guess it was some CPU scheduling issue; and it was pretty consistent. 

I think this absolves the Windows port.]]></description>
		<content:encoded><![CDATA[<p>Kevin,<br />
Trying to eliminate a few options &#8211; I ran up the same test on my old RAC stack (using 10.2.0.1 linked in single-instance mode) under the Linux that was the one that the Oracle &#8220;build your own RAC&#8221; was keen on a couple of years ago. (A clone of Redhat 4.2, I think).</p>
<p>Intel 830 (Pentium 4) running at 2.1Ghz with 1Mb L2 cache I think, and DDR2 memory clocked at 533MHz (in case that&#8217;s significant)</p>
<blockquote><p>
Single run:  68 CPU seconds.<br />
Two runs against same table:  90 / 92 CPU seconds (7.6M latch misses).<br />
Running against two tables: 74 / 77 CPU seconds. (No latch anomalies)
</p></blockquote>
<p>I&#8217;m not keen on the variation, between concurrent runs  &#8211; I&#8217;d have to guess it was some CPU scheduling issue; and it was pretty consistent. </p>
<p>I think this absolves the Windows port.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31031</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 14 May 2008 05:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31031</guid>
		<description><![CDATA[Kevin,

Thanks for the feedback - but could I just confirm that you didn&#039;t manage to lose the line:

[sourcecode]alter session set &quot;_old_connect_by_enabled&quot; = true;[/sourcecode]

When I take that out, my times on 11.1.0.6 are:  21.8 seconds for a single table, and 21.8 seconds for using the same table in two concurrent executions.

In my concurrency test with the &lt;em&gt;&quot;old connect by&quot;&lt;/em&gt;, 11i went from 67 CPU seconds (single) to 75 CPU seconds (2 x same table). 

The concurrency test I showed (9i) was the worst case one (a comment I&#039;ve just added to the note) - and I picked that one because I&#039;ve also demonstrated it on 9i running on HP-UX 11.00, whereas the 8i test showed latch sleeps.  (I never got around to installing 10g on my old HP D370).

One random thought - is there any chance that the variation across versions might be related to changes in options for latching through &lt;em&gt;&quot;compare and swap&quot;&lt;/em&gt; rather than &lt;em&gt;&quot;test and set&quot;&lt;/em&gt; ?
]]></description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Thanks for the feedback &#8211; but could I just confirm that you didn&#8217;t manage to lose the line:</p>
<pre class="brush: plain; title: ; notranslate">alter session set &quot;_old_connect_by_enabled&quot; = true;</pre>
<p>When I take that out, my times on 11.1.0.6 are:  21.8 seconds for a single table, and 21.8 seconds for using the same table in two concurrent executions.</p>
<p>In my concurrency test with the <em>&#8220;old connect by&#8221;</em>, 11i went from 67 CPU seconds (single) to 75 CPU seconds (2 x same table). </p>
<p>The concurrency test I showed (9i) was the worst case one (a comment I&#8217;ve just added to the note) &#8211; and I picked that one because I&#8217;ve also demonstrated it on 9i running on HP-UX 11.00, whereas the 8i test showed latch sleeps.  (I never got around to installing 10g on my old HP D370).</p>
<p>One random thought &#8211; is there any chance that the variation across versions might be related to changes in options for latching through <em>&#8220;compare and swap&#8221;</em> rather than <em>&#8220;test and set&#8221;</em> ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevinclosson</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31028</link>
		<dc:creator><![CDATA[kevinclosson]]></dc:creator>
		<pubDate>Wed, 14 May 2008 00:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31028</guid>
		<description><![CDATA[&gt;&gt;Two concurrent runs against the same table: 177.8 CPU seconds each, plus 7.7 seconds each on “latch free” waits.

...I just ran this on a 2s8c Xeon Clovertown box with Linux 2.6.18 and 11.1.0.6.1 and it gets 12.6 seconds with one invocation...2 concurrent same table is 12.68.

...a lot of what you are seeing is due to the fact that the turion can spin its way through the &lt;b&gt;&lt;i&gt;test and set&lt;/i&gt;&lt;/b&gt; ops quite fast (because that is all L2 spinning), but the load and store ops required for the latch get/work/release cycle is way off balance due to the (likely) poor memory latency of the laptop...just a way off-balance test I think...either that or it is an oddity of the Windows port (which I know little about)...what I&#039;m trying to say is that one really shouldn&#039;t see that many wait gets spin off to sleep...even on a 2 CPU laptop.]]></description>
		<content:encoded><![CDATA[<p>&gt;&gt;Two concurrent runs against the same table: 177.8 CPU seconds each, plus 7.7 seconds each on “latch free” waits.</p>
<p>&#8230;I just ran this on a 2s8c Xeon Clovertown box with Linux 2.6.18 and 11.1.0.6.1 and it gets 12.6 seconds with one invocation&#8230;2 concurrent same table is 12.68.</p>
<p>&#8230;a lot of what you are seeing is due to the fact that the turion can spin its way through the <b><i>test and set</i></b> ops quite fast (because that is all L2 spinning), but the load and store ops required for the latch get/work/release cycle is way off balance due to the (likely) poor memory latency of the laptop&#8230;just a way off-balance test I think&#8230;either that or it is an oddity of the Windows port (which I know little about)&#8230;what I&#8217;m trying to say is that one really shouldn&#8217;t see that many wait gets spin off to sleep&#8230;even on a 2 CPU laptop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31017</link>
		<dc:creator><![CDATA[Amit]]></dc:creator>
		<pubDate>Tue, 13 May 2008 03:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31017</guid>
		<description><![CDATA[Very Nice article Jonathan..We will be waiting eagerly for the code you use :)

Meanwhile I feel that reduced Latch gets could be due to use of Mutexes. Not sure if some of Database buffer cache latches has been modified to use Mutexes (Similar to Library Cache latches and Pins)]]></description>
		<content:encoded><![CDATA[<p>Very Nice article Jonathan..We will be waiting eagerly for the code you use :)</p>
<p>Meanwhile I feel that reduced Latch gets could be due to use of Mutexes. Not sure if some of Database buffer cache latches has been modified to use Mutexes (Similar to Library Cache latches and Pins)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prodlife</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31016</link>
		<dc:creator><![CDATA[prodlife]]></dc:creator>
		<pubDate>Mon, 12 May 2008 22:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31016</guid>
		<description><![CDATA[Jonathan,

Thank you so much for the excellent example and clear explanations.]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>Thank you so much for the excellent example and clear explanations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/#comment-31009</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 12 May 2008 11:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=362#comment-31009</guid>
		<description><![CDATA[Noons,

I&#039;ve no idea.  Obviously we can expect the code path to get longer on each release - 9i, for example, adds in the code to update the v$segstat - and I am doing something that is designed to emphasize the overheads on buffer visits. But I saw no reason for the extreme change in 10g - possibly Oracle has implemented a new latch mechanism on this platform at this release.

In fact, in 11.1.0.6 the time dropped back to 67 CPU seconds. But in this case the statistics had also changed dramatically, so I saw:
&lt;blockquote&gt;
8M latch gets instead of 32M
8M consistent gets instead of 16M
&lt;/blockquote&gt;
and the latter were mainly reported as
&lt;blockquote&gt;
8M consistent gets from cache (fastpath)
&lt;/blockquote&gt;]]></description>
		<content:encoded><![CDATA[<p>Noons,</p>
<p>I&#8217;ve no idea.  Obviously we can expect the code path to get longer on each release &#8211; 9i, for example, adds in the code to update the v$segstat &#8211; and I am doing something that is designed to emphasize the overheads on buffer visits. But I saw no reason for the extreme change in 10g &#8211; possibly Oracle has implemented a new latch mechanism on this platform at this release.</p>
<p>In fact, in 11.1.0.6 the time dropped back to 67 CPU seconds. But in this case the statistics had also changed dramatically, so I saw:</p>
<blockquote><p>
8M latch gets instead of 32M<br />
8M consistent gets instead of 16M
</p></blockquote>
<p>and the latter were mainly reported as</p>
<blockquote><p>
8M consistent gets from cache (fastpath)
</p></blockquote>
]]></content:encoded>
	</item>
</channel>
</rss>
