<?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: AWR oddity</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Sat, 18 May 2013 11:04:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Pythian Group Blog &#187; Blog Archive &#187; Log Buffer #70: a Carnival of the Vanities for DBAs</title>
		<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-24200</link>
		<dc:creator><![CDATA[Pythian Group Blog &#187; Blog Archive &#187; Log Buffer #70: a Carnival of the Vanities for DBAs]]></dc:creator>
		<pubDate>Fri, 09 Nov 2007 18:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-24200</guid>
		<description><![CDATA[[...] to things Oracle, Jonathan Lewis&#8217;s Oracle Scratchpad has an item on an AWR oddity. No, not its licensing terms, it&#8217;s a discrepancy between time stats as reported by statspack [...]]]></description>
		<content:encoded><![CDATA[<p>[...] to things Oracle, Jonathan Lewis&#8217;s Oracle Scratchpad has an item on an AWR oddity. No, not its licensing terms, it&#8217;s a discrepancy between time stats as reported by statspack [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-24100</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 08 Nov 2007 10:35:39 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-24100</guid>
		<description><![CDATA[Graham,

Thanks for the taking the time to comment - especially since you must be very busy getting ready for OpenWorld at the moment.

I can&#039;t do anything at the moment to confirm that your observation is the solution to the puzzle, but I will be back on the client site in a couple of weeks and will check to see if I can find the balancing CPU in a later snapshot.

Ideally, of course, if there had been a single call (or small set of calls) responsible for the difference I would have seen something reported with zero exexutions in the &quot;SQL ordered by CPU&quot; section of the AWR report,  with no matching report in any of the equivalent sections of the spreport. 

Unfortunately, my AWR report doesn&#039;t show any expensive code with zero executions; and Statspack has been configured with some very large thresholds, so there is virtually nothing in any of the SQL listings - which means I can&#039;t sensibly compare the two to check for samples of SQL (or PL/SQL ) with small differences in execution counts but large differences in resource consumption.

To be continued....]]></description>
		<content:encoded><![CDATA[<p>Graham,</p>
<p>Thanks for the taking the time to comment &#8211; especially since you must be very busy getting ready for OpenWorld at the moment.</p>
<p>I can&#8217;t do anything at the moment to confirm that your observation is the solution to the puzzle, but I will be back on the client site in a couple of weeks and will check to see if I can find the balancing CPU in a later snapshot.</p>
<p>Ideally, of course, if there had been a single call (or small set of calls) responsible for the difference I would have seen something reported with zero exexutions in the &#8220;SQL ordered by CPU&#8221; section of the AWR report,  with no matching report in any of the equivalent sections of the spreport. </p>
<p>Unfortunately, my AWR report doesn&#8217;t show any expensive code with zero executions; and Statspack has been configured with some very large thresholds, so there is virtually nothing in any of the SQL listings &#8211; which means I can&#8217;t sensibly compare the two to check for samples of SQL (or PL/SQL ) with small differences in execution counts but large differences in resource consumption.</p>
<p>To be continued&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham Wood</title>
		<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-24042</link>
		<dc:creator><![CDATA[Graham Wood]]></dc:creator>
		<pubDate>Wed, 07 Nov 2007 22:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-24042</guid>
		<description><![CDATA[I believe that the issue here is that the data reported as CPU time in 10g comes from DB CPU value in v$sys_time_model as opposed to the &#039;CPU used by this session&#039; value in v$sysstat. There is a major difference between these two values, which is that sysstat value is only updated at the end of the call, whereas the v$sys_time_model value is updated every 5 seconds. 
In a situation where there are calls that span snapshots this can lead to gross under/over accounting of the sysstat value, for example a call that takes around 3 hours to complete will appear as zero CPU usage for the first two hours, followed by 3 hours of CPU usage in the last hour.]]></description>
		<content:encoded><![CDATA[<p>I believe that the issue here is that the data reported as CPU time in 10g comes from DB CPU value in v$sys_time_model as opposed to the &#8216;CPU used by this session&#8217; value in v$sysstat. There is a major difference between these two values, which is that sysstat value is only updated at the end of the call, whereas the v$sys_time_model value is updated every 5 seconds.<br />
In a situation where there are calls that span snapshots this can lead to gross under/over accounting of the sysstat value, for example a call that takes around 3 hours to complete will appear as zero CPU usage for the first two hours, followed by 3 hours of CPU usage in the last hour.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vlad Sadilovskiy</title>
		<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23819</link>
		<dc:creator><![CDATA[Vlad Sadilovskiy]]></dc:creator>
		<pubDate>Mon, 05 Nov 2007 21:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23819</guid>
		<description><![CDATA[Thanks, Jonathan. I also did my share of testing, but was not able to reproduce the issue you posted.

It is definitely strange to see this big gap. The possibilities of testing scenarios could be endless. For instance is possible that v$sys_time_model and v$sysstat hold information from different or intersecting sources as I mentioned in &quot;recursive calls&quot; post. Or, perhaps some rare tools or access methods or patterns do not register CPU utilization in the v$sysstat.

I wonder if this can be clarified with OS metrics captured by OS tools not from within the Oracle.

Whatever was included in the CPU time/DB CPU (from sys time model) by AWR, it will be very interesting to discover.]]></description>
		<content:encoded><![CDATA[<p>Thanks, Jonathan. I also did my share of testing, but was not able to reproduce the issue you posted.</p>
<p>It is definitely strange to see this big gap. The possibilities of testing scenarios could be endless. For instance is possible that v$sys_time_model and v$sysstat hold information from different or intersecting sources as I mentioned in &#8220;recursive calls&#8221; post. Or, perhaps some rare tools or access methods or patterns do not register CPU utilization in the v$sysstat.</p>
<p>I wonder if this can be clarified with OS metrics captured by OS tools not from within the Oracle.</p>
<p>Whatever was included in the CPU time/DB CPU (from sys time model) by AWR, it will be very interesting to discover.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Recursive Calls &#171; Observing Oracle</title>
		<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23750</link>
		<dc:creator><![CDATA[Recursive Calls &#171; Observing Oracle]]></dc:creator>
		<pubDate>Mon, 05 Nov 2007 05:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23750</guid>
		<description><![CDATA[[...] figures of the later when reporting Top 5 Timed Events. This perhaps holds an explanation for the AWR oddity seen by Jonathan Lewis. It would be interesting to find the relevant clues in the reports or that [...]]]></description>
		<content:encoded><![CDATA[<p>[...] figures of the later when reporting Top 5 Timed Events. This perhaps holds an explanation for the AWR oddity seen by Jonathan Lewis. It would be interesting to find the relevant clues in the reports or that [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23600</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 02 Nov 2007 10:08:18 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23600</guid>
		<description><![CDATA[Vlad,
Thanks for the note. The claim in the blog is almost certainly wrong, and I&#039;ve just written in to the Oracle-L list to recant on this one; but there are still a couple of follow-up questions I&#039;m going to have about the implications - so I&#039;ll be leaving the blog in place and commenting on it in a few days.

DB CPU: The statspack figure is 3,210.5 (i.e. the total CPU (approx) as seen also by AWR).

The discrepancy between Statspack and AWR is probably explained (plus or minus a bit) in the OS Statistics from AWR:
&lt;code&gt;
SYS_TIME __________ 8,305
USER_TIME _________ 175,722
OS_CPU_WAIT_TIME __ 172,000 
&lt;/code&gt;

I assume you mean this from the reference manuals for the recursive CPU: &lt;i&gt;&quot;Total CPU time used by non-user calls (recursive calls). Subtract this value from &quot;CPU used by this session&quot; to determine how much CPU time was used by the user
calls.&lt;/i&gt;

Bear in mind that the manuals often get out of date, and aren&#039;t always exact and unambiguous at the best of times.  I suspect that that definition hasn&#039;t changed since 5.1 - and explains why lots of people were still trying to &quot;reduce the recursive CPU&quot; 10 years after pl/sql blocks came on the scene.

&quot;non-user&quot; in this context means the CPU due to the function calls not made directly by the user. The statistic is, after all, only interested in CPU attributed to the Oracle process - it doesn&#039;t know (or care) what is at the client end to the two-task.]]></description>
		<content:encoded><![CDATA[<p>Vlad,<br />
Thanks for the note. The claim in the blog is almost certainly wrong, and I&#8217;ve just written in to the Oracle-L list to recant on this one; but there are still a couple of follow-up questions I&#8217;m going to have about the implications &#8211; so I&#8217;ll be leaving the blog in place and commenting on it in a few days.</p>
<p>DB CPU: The statspack figure is 3,210.5 (i.e. the total CPU (approx) as seen also by AWR).</p>
<p>The discrepancy between Statspack and AWR is probably explained (plus or minus a bit) in the OS Statistics from AWR:<br />
<code><br />
SYS_TIME __________ 8,305<br />
USER_TIME _________ 175,722<br />
OS_CPU_WAIT_TIME __ 172,000<br />
</code></p>
<p>I assume you mean this from the reference manuals for the recursive CPU: <i>&#8220;Total CPU time used by non-user calls (recursive calls). Subtract this value from &#8220;CPU used by this session&#8221; to determine how much CPU time was used by the user<br />
calls.</i></p>
<p>Bear in mind that the manuals often get out of date, and aren&#8217;t always exact and unambiguous at the best of times.  I suspect that that definition hasn&#8217;t changed since 5.1 &#8211; and explains why lots of people were still trying to &#8220;reduce the recursive CPU&#8221; 10 years after pl/sql blocks came on the scene.</p>
<p>&#8220;non-user&#8221; in this context means the CPU due to the function calls not made directly by the user. The statistic is, after all, only interested in CPU attributed to the Oracle process &#8211; it doesn&#8217;t know (or care) what is at the client end to the two-task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vlad Sadilovskiy</title>
		<link>http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23582</link>
		<dc:creator><![CDATA[Vlad Sadilovskiy]]></dc:creator>
		<pubDate>Thu, 01 Nov 2007 23:20:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/11/01/awr-oddity/#comment-23582</guid>
		<description><![CDATA[Do you have DB CPU value for these cases?

I&#039;d cross-verify this info using trace. 

Description of the recursive CPU usage doesn&#039;t seem to have changed for awhile. 

On the side note, the &quot;non-user&quot; in the definition seems a little strange, as all calls non-user (as in &quot;automatic&quot;) and could be user made (as in &quot;non-Oracle, 3rd party&quot;) at the same time.]]></description>
		<content:encoded><![CDATA[<p>Do you have DB CPU value for these cases?</p>
<p>I&#8217;d cross-verify this info using trace. </p>
<p>Description of the recursive CPU usage doesn&#8217;t seem to have changed for awhile. </p>
<p>On the side note, the &#8220;non-user&#8221; in the definition seems a little strange, as all calls non-user (as in &#8220;automatic&#8221;) and could be user made (as in &#8220;non-Oracle, 3rd party&#8221;) at the same time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
