<?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: gc cr disk read</title>
	<atom:link href="http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/feed/" rel="self" type="application/rss+xml" />
	<link>http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/</link>
	<description>Discussions about Oracle performance tuning, RAC, Oracle internal &#38; E-business suite.</description>
	<lastBuildDate>Sun, 19 May 2013 12:13:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Scripts Monitoração &#8211; Oracle &#171; OnlyWhatMatters</title>
		<link>http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/#comment-1997</link>
		<dc:creator><![CDATA[Scripts Monitoração &#8211; Oracle &#171; OnlyWhatMatters]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 11:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=1010#comment-1997</guid>
		<description><![CDATA[[...] quias os latch contetion que estão ocorrendo na base de dados; • Top 10 Queries using more disk reads: mostra as 10 queries que estão consumindo mais disco neste momento; • Top 10 Queries using more [...]]]></description>
		<content:encoded><![CDATA[<p>[...] quias os latch contetion que estão ocorrendo na base de dados; • Top 10 Queries using more disk reads: mostra as 10 queries que estão consumindo mais disco neste momento; • Top 10 Queries using more [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kulkarni</title>
		<link>http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/#comment-1469</link>
		<dc:creator><![CDATA[kulkarni]]></dc:creator>
		<pubDate>Thu, 31 May 2012 17:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=1010#comment-1469</guid>
		<description><![CDATA[Hello Riyaj,
Thanks a lot for your wonderful explanation. I will run the query provided by you to check session level stats when this problem occurs again. This will confirm if waits are for data block consistent reads or for transaction table consistent reads.

However by the following lines in the trace file it appears that the session is suffering from ‘transaction table consistent reads – undo records applied&#039;.


WAIT #2: nam=&#039;db file sequential read&#039; ela= 4278 file#=5 block#=1351837 blocks=1 obj#=0 tim=5088627255019 --&gt; here block being waited for is from an UNDO segment.

WAIT #2: nam=&#039;gc cr disk read&#039; ela= 593 p1=5 p2=1351834 p3=252 obj#=0 tim=5088627255928  --&gt; again blocks are read from UNDO segment for UNDO apply for transaction table consistent reads.

I will also dump the blocks next time when this issue occurs again( I hope it is better to dump the data block( here UNDO block) when this issue is happening)

Thanks again for sparing your valuable,

Bheemasen]]></description>
		<content:encoded><![CDATA[<p>Hello Riyaj,<br />
Thanks a lot for your wonderful explanation. I will run the query provided by you to check session level stats when this problem occurs again. This will confirm if waits are for data block consistent reads or for transaction table consistent reads.</p>
<p>However by the following lines in the trace file it appears that the session is suffering from ‘transaction table consistent reads – undo records applied&#8217;.</p>
<p>WAIT #2: nam=&#8217;db file sequential read&#8217; ela= 4278 file#=5 block#=1351837 blocks=1 obj#=0 tim=5088627255019 &#8211;&gt; here block being waited for is from an UNDO segment.</p>
<p>WAIT #2: nam=&#8217;gc cr disk read&#8217; ela= 593 p1=5 p2=1351834 p3=252 obj#=0 tim=5088627255928  &#8211;&gt; again blocks are read from UNDO segment for UNDO apply for transaction table consistent reads.</p>
<p>I will also dump the blocks next time when this issue occurs again( I hope it is better to dump the data block( here UNDO block) when this issue is happening)</p>
<p>Thanks again for sparing your valuable,</p>
<p>Bheemasen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riyaj Shamsudeen</title>
		<link>http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/#comment-1468</link>
		<dc:creator><![CDATA[Riyaj Shamsudeen]]></dc:creator>
		<pubDate>Thu, 31 May 2012 14:31:58 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=1010#comment-1468</guid>
		<description><![CDATA[Hello Kulkarni

  For commit cleanouts:- undo header blocks (transaction table entries) and undo blocks associated with the transaction table control block changes must be read. The transaction table in the undo header block will indicate the transaction state. But, if the transaction table slot is overwritten for that transaction (and so commit SCN is not immediately available), then Database code will follow undo chain of  the transaction table control blocks to create a prior version of transaction table recursively, in a quest to find commit SCN of the transaction.  

  For consistent reads:- undo chain of a transaction (a transaction that is either active or commit SCN of that transaction is greater than query SCN) must be followed for consistent read buffer generation.
 
  First thing is to differentiate between two events: Does the session suffer from &#039;data blocks consistent reads - undo records applied&#039; or &#039;transaction table consistent reads - undo records applied&quot; issue? (Stats names can be little different between versions) Check the session level stats to identify that:
&lt;pre&gt;
undefine sid
undefine search_string
accept search_string prompt &#039;Enter the wildcard character (Null=All):&#039;
accept value_threshold prompt &#039;Enter value threshold :&#039;
accept sid prompt &#039;Enter sid :&#039;
select  stat.name, ses.value from
v$sesstat ses , v$statname stat
where stat.statistic#=ses.statistic# and
ses.sid=&amp;sid
and lower(stat.name) like  lower(&#039;%&#039;&#124;&#124;nvl(&#039;&amp;&amp;search_string&#039;,&#039;%&#039;)&#124;&#124;&#039;%&#039;)
and ses.value &gt;= to_number(nvl(&#039;&amp;&amp;value_threshold&#039;,0))
/
&lt;/pre&gt;

  As an additional check, review the block contents by dumping the blocks. Check if the undo records are indeed application table changes. You may have to dump the blocks to see  contents. alter system dump datafile  block min  block max  is the syntax.

  (1) If the blocks are undo header blocks and stats indicate high &#039;transaction table consistent reads - undo records applied&#039;, then it is possible that you are running in to a side effect of auto undo retention tuning feature. Essentially, auto tuning of undo retention tries to reduce probability of ORA-1555 errors, by keeping as much undo possible tuning undo_retention upwards. But, this can negatively affect commit cleanouts since the code is seemingly trying to find exact commit SCN by rolling back the transaction table header changes numerous times.

    In this scenario, you can setup max undo_retention and reduce the effects of auto tuned undo retention feature. you can also setup a job to select from the table, serially, and perform commit cleanouts in the same node.

  (2) If the changes are for CR generation:  (not undo header blocks),  then it would imply that these blocks are read for Consistent Read generation. Meaning, few processes have updated objects heavily in one node,and sessions in other nodes are reading the blocks, but can not use the blocks since there is a pending transaction (or that commit SCN is later then query env SCN), and so rolling back the transactions to create a Consistent Read copies. 

  You could solve this problem with two approaches.  If node 3 is modifying blocks heavily by (a) either schedule those intensive updates during less active period, so that, you can avoid these CR storm (b) Modify the application affinity such a way that programs modifying the objects aggressively and programs reading the blocks aggressively are executed in the same node. Features such as &quot;in memory undo&quot; etc doesn&#039;t work well with RAC and so, other node sessions might have to read the blocks physically.

I do see that light_works in node 3 is much higher than other nodes, this would indicate that node 3 is performing massive changes and other nodes are reading the blocks from node 3.

  I thought, I was going to write few words :)


HTH

Cheers, 
Riyaj]]></description>
		<content:encoded><![CDATA[<p>Hello Kulkarni</p>
<p>  For commit cleanouts:- undo header blocks (transaction table entries) and undo blocks associated with the transaction table control block changes must be read. The transaction table in the undo header block will indicate the transaction state. But, if the transaction table slot is overwritten for that transaction (and so commit SCN is not immediately available), then Database code will follow undo chain of  the transaction table control blocks to create a prior version of transaction table recursively, in a quest to find commit SCN of the transaction.  </p>
<p>  For consistent reads:- undo chain of a transaction (a transaction that is either active or commit SCN of that transaction is greater than query SCN) must be followed for consistent read buffer generation.</p>
<p>  First thing is to differentiate between two events: Does the session suffer from &#8216;data blocks consistent reads &#8211; undo records applied&#8217; or &#8216;transaction table consistent reads &#8211; undo records applied&#8221; issue? (Stats names can be little different between versions) Check the session level stats to identify that:</p>
<pre>
undefine sid
undefine search_string
accept search_string prompt 'Enter the wildcard character (Null=All):'
accept value_threshold prompt 'Enter value threshold :'
accept sid prompt 'Enter sid :'
select  stat.name, ses.value from
v$sesstat ses , v$statname stat
where stat.statistic#=ses.statistic# and
ses.sid=&amp;sid
and lower(stat.name) like  lower('%'||nvl('&amp;&amp;search_string','%')||'%')
and ses.value &gt;= to_number(nvl('&amp;&amp;value_threshold',0))
/
</pre>
<p>  As an additional check, review the block contents by dumping the blocks. Check if the undo records are indeed application table changes. You may have to dump the blocks to see  contents. alter system dump datafile  block min  block max  is the syntax.</p>
<p>  (1) If the blocks are undo header blocks and stats indicate high &#8216;transaction table consistent reads &#8211; undo records applied&#8217;, then it is possible that you are running in to a side effect of auto undo retention tuning feature. Essentially, auto tuning of undo retention tries to reduce probability of ORA-1555 errors, by keeping as much undo possible tuning undo_retention upwards. But, this can negatively affect commit cleanouts since the code is seemingly trying to find exact commit SCN by rolling back the transaction table header changes numerous times.</p>
<p>    In this scenario, you can setup max undo_retention and reduce the effects of auto tuned undo retention feature. you can also setup a job to select from the table, serially, and perform commit cleanouts in the same node.</p>
<p>  (2) If the changes are for CR generation:  (not undo header blocks),  then it would imply that these blocks are read for Consistent Read generation. Meaning, few processes have updated objects heavily in one node,and sessions in other nodes are reading the blocks, but can not use the blocks since there is a pending transaction (or that commit SCN is later then query env SCN), and so rolling back the transactions to create a Consistent Read copies. </p>
<p>  You could solve this problem with two approaches.  If node 3 is modifying blocks heavily by (a) either schedule those intensive updates during less active period, so that, you can avoid these CR storm (b) Modify the application affinity such a way that programs modifying the objects aggressively and programs reading the blocks aggressively are executed in the same node. Features such as &#8220;in memory undo&#8221; etc doesn&#8217;t work well with RAC and so, other node sessions might have to read the blocks physically.</p>
<p>I do see that light_works in node 3 is much higher than other nodes, this would indicate that node 3 is performing massive changes and other nodes are reading the blocks from node 3.</p>
<p>  I thought, I was going to write few words <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>HTH</p>
<p>Cheers,<br />
Riyaj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kulkarni</title>
		<link>http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/#comment-1467</link>
		<dc:creator><![CDATA[kulkarni]]></dc:creator>
		<pubDate>Thu, 31 May 2012 10:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=1010#comment-1467</guid>
		<description><![CDATA[we are also facing similar issue in our production environment. A select query reads UNDO blocks endlessly. Here I traced the session and got the following lines in the  trace file.


WAIT #2: nam=&#039;db file sequential read&#039; ela= 7208 file#=5 block#=1352468 blocks=1 obj#=0 tim=5088625409951
WAIT #2: nam=&#039;gc cr disk read&#039; ela= 446 p1=5 p2=1352466 p3=252 obj#=0 tim=5088625410501
WAIT #2: nam=&#039;db file sequential read&#039; ela= 6460 file#=5 block#=1352466 blocks=1 obj#=0 tim=5088625417000
WAIT #2: nam=&#039;gc cr disk read&#039; ela= 507 p1=5 p2=1352463 p3=252 obj#=0 tim=5088625417585
WAIT #2: nam=&#039;db file sequential read&#039; ela= 4773 file#=5 block#=1352463 blocks=1 obj#=0 tim=5088625422392
WAIT #2: nam=&#039;gc cr disk read&#039; ela= 681 p1=5 p2=1352460 p3=252 obj#=0 tim=5088625423231
WAIT #2: nam=&#039;db file sequential read&#039; ela= 9462 file#=5 block#=1352460 blocks=1 obj#=0 tim=5088625432742

Here you can see that only UNDO blocks are read and there is no request for data block. Is this due to commit clean out? This is THREE node 11gR1 RAC. We kill the session and rerun the job then it goes through.

We find this issue happening when ever this select query runs from either node1 or node2 and UNDO blocks are from node3( file#=5 is datafile for UNDO tablespace for node3)

Here is some more information on traffic between the nodes.

SQL&gt; select INST_ID,CR_REQUESTS,CURRENT_REQUESTS,UNDO_REQUESTS,DISK_READ_RESULTS,FAIRNESS_DOWN_CONVERTS,LIGHT_WORKS,ERRORS from gv$cr_block_server order by 1;
&lt;pre&gt;
INST_ID CR_REQUESTS CURRENT_REQUESTS UNDO_REQUESTS DISK_READ_RESULTS FAIRNESS_DOWN_CONVERTS LIGHT_WORKS     ERRORS
------- ----------- ---------------- ------------- ----------------- ---------------------- ----------- ----------
      1    54693551          6422699       1676129           7381302                6125434     4608074          0
      2     2948493          3134301       2661336           2829933                 352236      157720          0
      3    58158519         25104616      18365357          19676544                6631054    16605103          0

&lt;/pre&gt;
To avoid this commit clean out we need to find which process did modify the blocks in the node3 so that it can be run on the other nodes. We are not able to find it.]]></description>
		<content:encoded><![CDATA[<p>we are also facing similar issue in our production environment. A select query reads UNDO blocks endlessly. Here I traced the session and got the following lines in the  trace file.</p>
<p>WAIT #2: nam=&#8217;db file sequential read&#8217; ela= 7208 file#=5 block#=1352468 blocks=1 obj#=0 tim=5088625409951<br />
WAIT #2: nam=&#8217;gc cr disk read&#8217; ela= 446 p1=5 p2=1352466 p3=252 obj#=0 tim=5088625410501<br />
WAIT #2: nam=&#8217;db file sequential read&#8217; ela= 6460 file#=5 block#=1352466 blocks=1 obj#=0 tim=5088625417000<br />
WAIT #2: nam=&#8217;gc cr disk read&#8217; ela= 507 p1=5 p2=1352463 p3=252 obj#=0 tim=5088625417585<br />
WAIT #2: nam=&#8217;db file sequential read&#8217; ela= 4773 file#=5 block#=1352463 blocks=1 obj#=0 tim=5088625422392<br />
WAIT #2: nam=&#8217;gc cr disk read&#8217; ela= 681 p1=5 p2=1352460 p3=252 obj#=0 tim=5088625423231<br />
WAIT #2: nam=&#8217;db file sequential read&#8217; ela= 9462 file#=5 block#=1352460 blocks=1 obj#=0 tim=5088625432742</p>
<p>Here you can see that only UNDO blocks are read and there is no request for data block. Is this due to commit clean out? This is THREE node 11gR1 RAC. We kill the session and rerun the job then it goes through.</p>
<p>We find this issue happening when ever this select query runs from either node1 or node2 and UNDO blocks are from node3( file#=5 is datafile for UNDO tablespace for node3)</p>
<p>Here is some more information on traffic between the nodes.</p>
<p>SQL&gt; select INST_ID,CR_REQUESTS,CURRENT_REQUESTS,UNDO_REQUESTS,DISK_READ_RESULTS,FAIRNESS_DOWN_CONVERTS,LIGHT_WORKS,ERRORS from gv$cr_block_server order by 1;</p>
<pre>
INST_ID CR_REQUESTS CURRENT_REQUESTS UNDO_REQUESTS DISK_READ_RESULTS FAIRNESS_DOWN_CONVERTS LIGHT_WORKS     ERRORS
------- ----------- ---------------- ------------- ----------------- ---------------------- ----------- ----------
      1    54693551          6422699       1676129           7381302                6125434     4608074          0
      2     2948493          3134301       2661336           2829933                 352236      157720          0
      3    58158519         25104616      18365357          19676544                6631054    16605103          0

</pre>
<p>To avoid this commit clean out we need to find which process did modify the blocks in the node3 so that it can be run on the other nodes. We are not able to find it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riyaj Shamsudeen</title>
		<link>http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/#comment-963</link>
		<dc:creator><![CDATA[Riyaj Shamsudeen]]></dc:creator>
		<pubDate>Fri, 13 Jan 2012 14:03:36 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=1010#comment-963</guid>
		<description><![CDATA[Thank you, Mark.

Thanks for stopping by.]]></description>
		<content:encoded><![CDATA[<p>Thank you, Mark.</p>
<p>Thanks for stopping by.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Farnham</title>
		<link>http://orainternals.wordpress.com/2012/01/13/gc-cr-disk-read/#comment-962</link>
		<dc:creator><![CDATA[Mark Farnham]]></dc:creator>
		<pubDate>Fri, 13 Jan 2012 05:11:56 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=1010#comment-962</guid>
		<description><![CDATA[Most excellent posting, my friend. Clarity and technical depth winding up in 5 solid recommendations that have great potential to increase throughput and scalability and little risk that someone will  be able to twist your well explained reasoning into anything harmful.

A good whole chapter could be written about preparation of a tablespace to be made read only for a substantial period of time.

In extreme cases someone might also need to hermitize* sequences in support of application affinity so that blocks of seq$ are spared from excessive instance migration as well.

*hermitize meaning to isolate rows one per block (like hermits, one per dwelling place). Oracle normally stores about 75 sequence definitions per 8K block. The block grouping tends to be by order of definition and so may cross application affinity boundaries. Listing out the sequence names grouped by block can be quite illuminating.]]></description>
		<content:encoded><![CDATA[<p>Most excellent posting, my friend. Clarity and technical depth winding up in 5 solid recommendations that have great potential to increase throughput and scalability and little risk that someone will  be able to twist your well explained reasoning into anything harmful.</p>
<p>A good whole chapter could be written about preparation of a tablespace to be made read only for a substantial period of time.</p>
<p>In extreme cases someone might also need to hermitize* sequences in support of application affinity so that blocks of seq$ are spared from excessive instance migration as well.</p>
<p>*hermitize meaning to isolate rows one per block (like hermits, one per dwelling place). Oracle normally stores about 75 sequence definitions per 8K block. The block grouping tends to be by order of definition and so may cross application affinity boundaries. Listing out the sequence names grouped by block can be quite illuminating.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
