<?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: Optimisation ?</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 19 Jun 2013 22:21:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Oraboy</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53653</link>
		<dc:creator><![CDATA[Oraboy]]></dc:creator>
		<pubDate>Wed, 20 Feb 2013 01:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53653</guid>
		<description><![CDATA[Thanks a bunch.]]></description>
		<content:encoded><![CDATA[<p>Thanks a bunch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53650</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 19 Feb 2013 23:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53650</guid>
		<description><![CDATA[To stress a CPU you might want to work with a few copies of the table and query I use in this post: http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/

Watch out for the &quot;alter session&quot; command.]]></description>
		<content:encoded><![CDATA[<p>To stress a CPU you might want to work with a few copies of the table and query I use in this post: <a href="http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/" rel="nofollow">http://jonathanlewis.wordpress.com/2008/05/10/cpu-usage/</a></p>
<p>Watch out for the &#8220;alter session&#8221; command.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oraboy</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53646</link>
		<dc:creator><![CDATA[Oraboy]]></dc:creator>
		<pubDate>Tue, 19 Feb 2013 18:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53646</guid>
		<description><![CDATA[Jonathan - 
 Thanks much.

&gt;&gt;if by “load” you mean CPU consumption
Not just CPU consumption.. I am looking at CPU utilization (%usr and %sys ) , CPU load ( load average &amp; queue length in vmstat)

nothing tells me I am anywhere close to reaching max limit. (in other words, no pattern where cpu utilization is running at beyond 80% ..and no huge pile up on run-queue either)

But there are occasions where some operations take longer and being a simple dba (scope strictly limited to database) I cannot seem to find a justification.

Perhaps, I can take your lead on this &quot;A task that avoids stalling a thread can effectively take over the core.&quot; &amp; see if I can simulate some operation within a db, that on system-side would run continuously on a thread without letting the core to be shared by anyone else. 

Thanks again for your time.]]></description>
		<content:encoded><![CDATA[<p>Jonathan &#8211;<br />
 Thanks much.</p>
<p>&gt;&gt;if by “load” you mean CPU consumption<br />
Not just CPU consumption.. I am looking at CPU utilization (%usr and %sys ) , CPU load ( load average &amp; queue length in vmstat)</p>
<p>nothing tells me I am anywhere close to reaching max limit. (in other words, no pattern where cpu utilization is running at beyond 80% ..and no huge pile up on run-queue either)</p>
<p>But there are occasions where some operations take longer and being a simple dba (scope strictly limited to database) I cannot seem to find a justification.</p>
<p>Perhaps, I can take your lead on this &#8220;A task that avoids stalling a thread can effectively take over the core.&#8221; &amp; see if I can simulate some operation within a db, that on system-side would run continuously on a thread without letting the core to be shared by anyone else. </p>
<p>Thanks again for your time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53607</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 18 Feb 2013 07:37:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53607</guid>
		<description><![CDATA[Oraboy,

This isn&#039;t my specialist subject either - when I&#039;m stuck on CPUs etc. I talk to people like &lt;a href=&quot;http://kevinclosson.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Kevin Closson&lt;/a&gt; and &lt;a href=&quot;http://www.scaleabilities.co.uk/&quot; rel=&quot;nofollow&quot;&gt;James Morle&lt;/a&gt; to help me out.

Basic sketch: a single chip - plugged into a single socket - can contain multiple CPU Cores; a single CPU Core may be able to operate in a multi-threaded fashion (2 threads being fairly common nowadays) - and Oracle typically reports each possible thread as a CPU. So my laptop (for example) is reported by Oracle as 1 socket, 4 Cores and 8 CPUs (because it runs two threads per core).

A multi-threaded Core is, however, only capable of doing one thing at a time. Just as your operating system can appear to be doing many things at once because of time-slicing and scheduling, your core is switching between threads to give the impression of multiple threads running simultaneously. 

In the case of the core, though, the switches only take place (I believe, though I may be out of date) when a thread &quot;stalls&quot;  - by analogy, think of an Oracle session running for while, then having to wait for a &quot;db file sequential read&quot;, the session &quot;stalls&quot;, and the O/S switches to running another session. In the case of the thread stalling, an equivalent task would be loading a page of main memory into the processor cache - the thread stalls, so a different thread starts. A task that avoids stalling a thread can effectively take over the core.

As far as your shared hardware is concerned - if by &quot;load&quot; you mean CPU consumption, then it is perfectly feasable that one of your databases could be using a far larger percentage of the available CORE time than the CPU statistics suggests, leading to the behaviour you&#039;re seeing.]]></description>
		<content:encoded><![CDATA[<p>Oraboy,</p>
<p>This isn&#8217;t my specialist subject either &#8211; when I&#8217;m stuck on CPUs etc. I talk to people like <a href="http://kevinclosson.wordpress.com/" rel="nofollow">Kevin Closson</a> and <a href="http://www.scaleabilities.co.uk/" rel="nofollow">James Morle</a> to help me out.</p>
<p>Basic sketch: a single chip &#8211; plugged into a single socket &#8211; can contain multiple CPU Cores; a single CPU Core may be able to operate in a multi-threaded fashion (2 threads being fairly common nowadays) &#8211; and Oracle typically reports each possible thread as a CPU. So my laptop (for example) is reported by Oracle as 1 socket, 4 Cores and 8 CPUs (because it runs two threads per core).</p>
<p>A multi-threaded Core is, however, only capable of doing one thing at a time. Just as your operating system can appear to be doing many things at once because of time-slicing and scheduling, your core is switching between threads to give the impression of multiple threads running simultaneously. </p>
<p>In the case of the core, though, the switches only take place (I believe, though I may be out of date) when a thread &#8220;stalls&#8221;  &#8211; by analogy, think of an Oracle session running for while, then having to wait for a &#8220;db file sequential read&#8221;, the session &#8220;stalls&#8221;, and the O/S switches to running another session. In the case of the thread stalling, an equivalent task would be loading a page of main memory into the processor cache &#8211; the thread stalls, so a different thread starts. A task that avoids stalling a thread can effectively take over the core.</p>
<p>As far as your shared hardware is concerned &#8211; if by &#8220;load&#8221; you mean CPU consumption, then it is perfectly feasable that one of your databases could be using a far larger percentage of the available CORE time than the CPU statistics suggests, leading to the behaviour you&#8217;re seeing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oraboy</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53583</link>
		<dc:creator><![CDATA[Oraboy]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 17:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53583</guid>
		<description><![CDATA[&gt;&gt;On the other hand this machine is one of those Solaris boxes that likes to pretend that it’s got 128 CPUs when really it’s only 16 cores with 8 lightweight threads per core – you don’t want anyone running a query that uses 2 solid CPU minute on one of those boxes because it’s taking out 1/16th of your CPU availability, while reporting a load of 1/128 of your CPUs.

Johathan - 
 Apologies for asking system side naive question..am not a systems guy and not understanding the core vs thread difference.
 Can you throw some light into the above statement? 

(dealing with similar situation.. more than 1 db running on solaris box.. the overall load is always reported low..but  from experience I have noticed, performance on 1 database varies depending on what is run on other database.. understand its all using same physical resources..but I am trying to get some pointers, it *is* a concern even if system is not running under max resource utilization )

Thanks]]></description>
		<content:encoded><![CDATA[<p>&gt;&gt;On the other hand this machine is one of those Solaris boxes that likes to pretend that it’s got 128 CPUs when really it’s only 16 cores with 8 lightweight threads per core – you don’t want anyone running a query that uses 2 solid CPU minute on one of those boxes because it’s taking out 1/16th of your CPU availability, while reporting a load of 1/128 of your CPUs.</p>
<p>Johathan &#8211;<br />
 Apologies for asking system side naive question..am not a systems guy and not understanding the core vs thread difference.<br />
 Can you throw some light into the above statement? </p>
<p>(dealing with similar situation.. more than 1 db running on solaris box.. the overall load is always reported low..but  from experience I have noticed, performance on 1 database varies depending on what is run on other database.. understand its all using same physical resources..but I am trying to get some pointers, it *is* a concern even if system is not running under max resource utilization )</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53571</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 09:12:36 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53571</guid>
		<description><![CDATA[David,

The problem with the &quot;Old Believers&quot; is that that old beliefs don&#039;t get unpublished on the internet, and there are plenty of people who &quot;tune by google&quot; who find it, and then republish it just to have something in their blogs.]]></description>
		<content:encoded><![CDATA[<p>David,</p>
<p>The problem with the &#8220;Old Believers&#8221; is that that old beliefs don&#8217;t get unpublished on the internet, and there are plenty of people who &#8220;tune by google&#8221; who find it, and then republish it just to have something in their blogs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Aldridge</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53527</link>
		<dc:creator><![CDATA[David Aldridge]]></dc:creator>
		<pubDate>Thu, 14 Feb 2013 08:50:26 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53527</guid>
		<description><![CDATA[Ah, cold backup is still with us in some circles, and it&#039;s extraordinary to see the lack of competence that is still &quot;out there&quot;. A couple of years ago I saw &quot;hot backups&quot; in NOARCHIVELOG mode in a system about to go into production for a critical client, with a decison taken not to &quot;take the risk&quot; of moving to ARCHIVELOG mode before the switchover.

In fact every sort of monstrosity and perversion that Oracle experts have been railing against for the past 15 years still has its set of &quot;Old Believers&quot;, sad to say.]]></description>
		<content:encoded><![CDATA[<p>Ah, cold backup is still with us in some circles, and it&#8217;s extraordinary to see the lack of competence that is still &#8220;out there&#8221;. A couple of years ago I saw &#8220;hot backups&#8221; in NOARCHIVELOG mode in a system about to go into production for a critical client, with a decison taken not to &#8220;take the risk&#8221; of moving to ARCHIVELOG mode before the switchover.</p>
<p>In fact every sort of monstrosity and perversion that Oracle experts have been railing against for the past 15 years still has its set of &#8220;Old Believers&#8221;, sad to say.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53517</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 17:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53517</guid>
		<description><![CDATA[David,

&quot;Cold backup&quot; - long time since I&#039;ve done one of those ;)
Still, no matter how bizarre an experiment I come up with, someone always comes up with an example of why it might make sense occasionally.

No great significance in slipping in the ANSI - it just happened to be the case, and ANSI SQL does make it that little bit harder to generate the necessary SQL Baseline.]]></description>
		<content:encoded><![CDATA[<p>David,</p>
<p>&#8220;Cold backup&#8221; &#8211; long time since I&#8217;ve done one of those ;)<br />
Still, no matter how bizarre an experiment I come up with, someone always comes up with an example of why it might make sense occasionally.</p>
<p>No great significance in slipping in the ANSI &#8211; it just happened to be the case, and ANSI SQL does make it that little bit harder to generate the necessary SQL Baseline.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuri</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53495</link>
		<dc:creator><![CDATA[Yuri]]></dc:creator>
		<pubDate>Tue, 12 Feb 2013 12:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53495</guid>
		<description><![CDATA[or you know what does DBA-team monitoring and interrupt query timely to prevent them of observing you :)]]></description>
		<content:encoded><![CDATA[<p>or you know what does DBA-team monitoring and interrupt query timely to prevent them of observing you :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Shankey</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/11/optimisation-2/#comment-53494</link>
		<dc:creator><![CDATA[Peter Shankey]]></dc:creator>
		<pubDate>Tue, 12 Feb 2013 11:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10572#comment-53494</guid>
		<description><![CDATA[It&#039;s not that complex.. The typical person treats computers like doors .. keep banging at the door sooner or later it will open :)]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s not that complex.. The typical person treats computers like doors .. keep banging at the door sooner or later it will open :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
