<?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: System/Kernel Mode CPU Usage &#8211; What is Wrong with this Quote?</title>
	<atom:link href="http://hoopercharles.wordpress.com/2010/06/16/systemkernel-mode-cpu-usage-what-is-wrong-with-this-quote/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2010/06/16/systemkernel-mode-cpu-usage-what-is-wrong-with-this-quote/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Thu, 23 May 2013 04:02:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/06/16/systemkernel-mode-cpu-usage-what-is-wrong-with-this-quote/#comment-1430</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 18 Jun 2010 13:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2656#comment-1430</guid>
		<description><![CDATA[It looks like Kevin Closson, who is far more familiar with this topic, set up a parallel blog article to dig further into the details.  That is part of the point of this blog article series, as mentioned in the blue text in this article.  If you read something that does not agree with your prior knowledge, do you:
* Stop reading.
* Insult the author, rather than discuss the written material.
* Assume that the author is wrong and keep reading.
* Assume that the author is right and keep reading.
* Stop, think, and understand (and probably set up a couple of test cases too).

Kevin&#039;s parallel article on the topic may be found &lt;a href=&quot;http://kevinclosson.wordpress.com/2010/06/17/running-oracle-database-on-a-system-with-40-kernel-mode-overhead-are-you-normal/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.]]></description>
		<content:encoded><![CDATA[<p>It looks like Kevin Closson, who is far more familiar with this topic, set up a parallel blog article to dig further into the details.  That is part of the point of this blog article series, as mentioned in the blue text in this article.  If you read something that does not agree with your prior knowledge, do you:<br />
* Stop reading.<br />
* Insult the author, rather than discuss the written material.<br />
* Assume that the author is wrong and keep reading.<br />
* Assume that the author is right and keep reading.<br />
* Stop, think, and understand (and probably set up a couple of test cases too).</p>
<p>Kevin&#8217;s parallel article on the topic may be found <a href="http://kevinclosson.wordpress.com/2010/06/17/running-oracle-database-on-a-system-with-40-kernel-mode-overhead-are-you-normal/" rel="nofollow">here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/06/16/systemkernel-mode-cpu-usage-what-is-wrong-with-this-quote/#comment-1428</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 18 Jun 2010 12:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2656#comment-1428</guid>
		<description><![CDATA[&quot;From Google&quot;,

Please review the following before posting comments to this blog:
http://www.logicalfallacies.info/relevance/ad-hominem/

It is simply illogical to advance that kernel mode CPU usage is very easy to understand, and therefore suggest that the author&#039;s knowledge is inferior to that of a beginner.

What an author shares in a book does not necessarily communicate the depth of knowledge that an author has about a particular sub-topic in the book.  Some of the sections of the book appear as though the author planned to circle back to fill in the limited details provided in some of the paragraphs, while other sections show deep knowledge.

To be absolutely clear, I believe that this book&#039;s author is very knowledgable about Oracle Databases, and demonstrates that repeatedly in the book.  He mentions in the book that he worked with Cary Millsap at Oracle Corp (I believe in the same department), and that likely means he has at least 20 years of in-depth knowledge in the functioning of Oracle Databases.  The author&#039;s &quot;Forecasting Oracle Performance&quot; book did not appear to have the same pattern of drifting between the internals of modifying the hidden Oracle parameters in one page and then a couple of pages later to simply glossing over problems - essentially stating that &quot;there is nothing the DBA can do when this happens.&quot;]]></description>
		<content:encoded><![CDATA[<p>&#8220;From Google&#8221;,</p>
<p>Please review the following before posting comments to this blog:<br />
<a href="http://www.logicalfallacies.info/relevance/ad-hominem/" rel="nofollow">http://www.logicalfallacies.info/relevance/ad-hominem/</a></p>
<p>It is simply illogical to advance that kernel mode CPU usage is very easy to understand, and therefore suggest that the author&#8217;s knowledge is inferior to that of a beginner.</p>
<p>What an author shares in a book does not necessarily communicate the depth of knowledge that an author has about a particular sub-topic in the book.  Some of the sections of the book appear as though the author planned to circle back to fill in the limited details provided in some of the paragraphs, while other sections show deep knowledge.</p>
<p>To be absolutely clear, I believe that this book&#8217;s author is very knowledgable about Oracle Databases, and demonstrates that repeatedly in the book.  He mentions in the book that he worked with Cary Millsap at Oracle Corp (I believe in the same department), and that likely means he has at least 20 years of in-depth knowledge in the functioning of Oracle Databases.  The author&#8217;s &#8220;Forecasting Oracle Performance&#8221; book did not appear to have the same pattern of drifting between the internals of modifying the hidden Oracle parameters in one page and then a couple of pages later to simply glossing over problems &#8211; essentially stating that &#8220;there is nothing the DBA can do when this happens.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: from google</title>
		<link>http://hoopercharles.wordpress.com/2010/06/16/systemkernel-mode-cpu-usage-what-is-wrong-with-this-quote/#comment-1427</link>
		<dc:creator><![CDATA[from google]]></dc:creator>
		<pubDate>Fri, 18 Jun 2010 09:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2656#comment-1427</guid>
		<description><![CDATA[Hi,

The kernel mode concept is very easy to understand, even, for the beginners too. do you think the author is not aware of it ?

You had enforced to find something wrong. It looks there is a wording game here.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The kernel mode concept is very easy to understand, even, for the beginners too. do you think the author is not aware of it ?</p>
<p>You had enforced to find something wrong. It looks there is a wording game here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/06/16/systemkernel-mode-cpu-usage-what-is-wrong-with-this-quote/#comment-1424</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 18 Jun 2010 00:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2656#comment-1424</guid>
		<description><![CDATA[Marcin,

Nice article.  Just a couple of quotes from the article:
&lt;blockquote&gt;&quot;Most operations interacting with the system require permissions not available to a user level process, e.g. I/O performed with a device present on the system, or any form of communication with other processes requires the use of system calls...  On Unix, Unix-like and other POSIX-compatible operating systems, popular system calls are open, read, write, close, wait, exec, fork, exit, and kill. Many of today&#039;s operating systems have hundreds of system calls. For example, Linux has 319 different calls, and FreeBSD has almost 500.  Tools such as strace and truss allow a process to execute from start and report all system calls the process invokes, or can attach to an already running process and intercept any system call made by said process if the operation does not violate the permissions of the user.&quot;&lt;/blockquote&gt;

A quote from the same &quot;Oracle Performance Firefighting&quot; book, in this blog article http://hoopercharles.wordpress.com/2010/06/13/db-file-scattered-read-wait-event-what-is-wrong-with-this-quote/ indicates that the book author used strace to demonstrate that Oracle database used readv to read multiple blocks from disk, which the author described as being associated with a db file scattered read wait event.  I believe that readv is considered a system call, and I would assume that call would motivate at least some CPU usage in kernel mode.  To state that essentially any activity not directly related to a user task is considered kernel CPU time might be considered &quot;missing the boat&quot;.

Page 200 of the Expert Oracle Practices book shows interesting output that is related to this blog article.  The output shows output from 64 bit Windows where a 10.2.0.4 database instance was consuming (roughly per second):
&lt;pre&gt;
User Time: 0.31S    Sys Time: 0.75S
User Time: 0.24S    Sys Time: 0.86S
User Time: 0.22S    Sys Time: 0.84S
&lt;/pre&gt;

That is roughly 80% of the CPU time consumed by the database instance in kernel mode.  What happened during that time period?  The instance was running a SQL statement that was performing 100% (or very close to it) logical I/O, requiring over an hour at 100% CPU utilization (100% of 1 CPU) to output the first row.  The troubling part?  In the next chapter this was the same SQL statement that was fixed in the next chapter with the fix results summary information appearing on page 313.  This query that started at 1 hour, 6 minutes, and 44 seconds completed in a low of 2.65 seconds just by trying to help the Oracle optimizer understand the intent of the query, and was further dropped to 0.28 seconds by switching from STATISTICS_LEVEL=&#039;ALL&#039; to STATISTICS_LEVEL=&#039;TYPICAL&#039;

In short, if you just throw up your hands when you see excessive kernel mode CPU usage, thinking that it is just like taxes, completely out of your control, you might be missing an opportunity.

My notes suggest that the following activities that needed to be performed for an Oracle database instance require kernel mode CPU time:
* network I/O
* disk I/O (especially with buffered file systems)
* timer calls (typically gettimeofday calls)
* memory access requests
* memory management
* process creation and termination (think session creation and termination)

It looks like my analysis seems to agree with what you stated above.

Any other discussion?]]></description>
		<content:encoded><![CDATA[<p>Marcin,</p>
<p>Nice article.  Just a couple of quotes from the article:</p>
<blockquote><p>&#8220;Most operations interacting with the system require permissions not available to a user level process, e.g. I/O performed with a device present on the system, or any form of communication with other processes requires the use of system calls&#8230;  On Unix, Unix-like and other POSIX-compatible operating systems, popular system calls are open, read, write, close, wait, exec, fork, exit, and kill. Many of today&#8217;s operating systems have hundreds of system calls. For example, Linux has 319 different calls, and FreeBSD has almost 500.  Tools such as strace and truss allow a process to execute from start and report all system calls the process invokes, or can attach to an already running process and intercept any system call made by said process if the operation does not violate the permissions of the user.&#8221;</p></blockquote>
<p>A quote from the same &#8220;Oracle Performance Firefighting&#8221; book, in this blog article <a href="http://hoopercharles.wordpress.com/2010/06/13/db-file-scattered-read-wait-event-what-is-wrong-with-this-quote/" rel="nofollow">http://hoopercharles.wordpress.com/2010/06/13/db-file-scattered-read-wait-event-what-is-wrong-with-this-quote/</a> indicates that the book author used strace to demonstrate that Oracle database used readv to read multiple blocks from disk, which the author described as being associated with a db file scattered read wait event.  I believe that readv is considered a system call, and I would assume that call would motivate at least some CPU usage in kernel mode.  To state that essentially any activity not directly related to a user task is considered kernel CPU time might be considered &#8220;missing the boat&#8221;.</p>
<p>Page 200 of the Expert Oracle Practices book shows interesting output that is related to this blog article.  The output shows output from 64 bit Windows where a 10.2.0.4 database instance was consuming (roughly per second):</p>
<pre>
User Time: 0.31S    Sys Time: 0.75S
User Time: 0.24S    Sys Time: 0.86S
User Time: 0.22S    Sys Time: 0.84S
</pre>
<p>That is roughly 80% of the CPU time consumed by the database instance in kernel mode.  What happened during that time period?  The instance was running a SQL statement that was performing 100% (or very close to it) logical I/O, requiring over an hour at 100% CPU utilization (100% of 1 CPU) to output the first row.  The troubling part?  In the next chapter this was the same SQL statement that was fixed in the next chapter with the fix results summary information appearing on page 313.  This query that started at 1 hour, 6 minutes, and 44 seconds completed in a low of 2.65 seconds just by trying to help the Oracle optimizer understand the intent of the query, and was further dropped to 0.28 seconds by switching from STATISTICS_LEVEL=&#8217;ALL&#8217; to STATISTICS_LEVEL=&#8217;TYPICAL&#8217;</p>
<p>In short, if you just throw up your hands when you see excessive kernel mode CPU usage, thinking that it is just like taxes, completely out of your control, you might be missing an opportunity.</p>
<p>My notes suggest that the following activities that needed to be performed for an Oracle database instance require kernel mode CPU time:<br />
* network I/O<br />
* disk I/O (especially with buffered file systems)<br />
* timer calls (typically gettimeofday calls)<br />
* memory access requests<br />
* memory management<br />
* process creation and termination (think session creation and termination)</p>
<p>It looks like my analysis seems to agree with what you stated above.</p>
<p>Any other discussion?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Przepiorowski</title>
		<link>http://hoopercharles.wordpress.com/2010/06/16/systemkernel-mode-cpu-usage-what-is-wrong-with-this-quote/#comment-1421</link>
		<dc:creator><![CDATA[Marcin Przepiorowski]]></dc:creator>
		<pubDate>Thu, 17 Jun 2010 21:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2656#comment-1421</guid>
		<description><![CDATA[Hello 

As far as I know system time is calculated when kernel is doing any system call  - http://en.wikipedia.org/wiki/System_call
In that case if software is using any kernel interfaces (disk, network, memory allocation, etc) a system time is calculated and it 
is related to program activity. Can it be named pure overhead ? I&#039;m not sure but I&#039;m open to discuss about it.

regards,
Marcin]]></description>
		<content:encoded><![CDATA[<p>Hello </p>
<p>As far as I know system time is calculated when kernel is doing any system call  &#8211; <a href="http://en.wikipedia.org/wiki/System_call" rel="nofollow">http://en.wikipedia.org/wiki/System_call</a><br />
In that case if software is using any kernel interfaces (disk, network, memory allocation, etc) a system time is calculated and it<br />
is related to program activity. Can it be named pure overhead ? I&#8217;m not sure but I&#8217;m open to discuss about it.</p>
<p>regards,<br />
Marcin</p>
]]></content:encoded>
	</item>
</channel>
</rss>
