
<?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/"
	
	>
<channel>
	<title>
	《关于parallel rollback的一点总结》的评论	</title>
	<atom:link href="http://www.killdb.com/2011/10/07/%E5%85%B3%E4%BA%8Eparallel-rollback%E7%9A%84%E4%B8%80%E7%82%B9%E6%80%BB%E7%BB%93/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.killdb.com/2011/10/07/%e5%85%b3%e4%ba%8eparallel-rollback%e7%9a%84%e4%b8%80%e7%82%b9%e6%80%bb%e7%bb%93/</link>
	<description>Phone:18180207355 提供专业Oracle/MySQL/PostgreSQL数据恢复、性能优化、迁移升级、紧急救援等服务</description>
	<lastBuildDate>Thu, 05 Sep 2013 09:46:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3.18</generator>
			<item>
				<title>
				作者：兜兜				</title>
				<link>http://www.killdb.com/2011/10/07/%e5%85%b3%e4%ba%8eparallel-rollback%e7%9a%84%e4%b8%80%e7%82%b9%e6%80%bb%e7%bb%93/#comment-1366</link>
		<dc:creator><![CDATA[兜兜]]></dc:creator>
		<pubDate>Thu, 05 Sep 2013 09:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.killdb.com/?p=602#comment-1366</guid>
					<description><![CDATA[这个实验如果添加 insert into  select @dblink ，也许就能看到  并行恢复慢了，我也只是猜想！

这里有一个AWR ，和这个有关 http://www.itpub.net/thread-1814543-1-1.html]]></description>
		<content:encoded><![CDATA[<p>这个实验如果添加 insert into  select @dblink ，也许就能看到  并行恢复慢了，我也只是猜想！</p>
<p>这里有一个AWR ，和这个有关 <a href="http://www.itpub.net/thread-1814543-1-1.html" rel="nofollow ugc">http://www.itpub.net/thread-1814543-1-1.html</a></p>
]]></content:encoded>
						</item>
						<item>
				<title>
				作者：roger				</title>
				<link>http://www.killdb.com/2011/10/07/%e5%85%b3%e4%ba%8eparallel-rollback%e7%9a%84%e4%b8%80%e7%82%b9%e6%80%bb%e7%bb%93/#comment-222</link>
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Fri, 07 Oct 2011 15:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.killdb.com/?p=602#comment-222</guid>
					<description><![CDATA[How to Disable Parallel Transaction Recovery When Parallel Txn Recovery is Active [ID 238507.1] 

--------------------------------------------------------------------------------
 
  修改时间 29-APR-2010     类型 PROBLEM     状态 PUBLISHED   


Checked for relevance on 18-Sep-2008
Checked for relevance on 29-April-2010

Symptom(s)
~~~~~~~~~~

Parallel Transaction Recovery is taking too long.

You can use V$TRANSACTION USED_UBLK to estimate how long the rollback is going 
to take but there is no formula for this.  If you shutdown the database after 
rollback has started, it will begin where it left off.  

You can also look at V$FAST_START_TRANSACTIONS for UNDOBLOCKSDONE 
versus UNDOBLOCKSTOTAL.



Change(s)
~~~~~~~~~~

A large transaction got killed or rolled back.


Cause
~~~~~~~

There are cases where parallel transaction recovery is not as fast as serial 
transaction recovery, because the pq slaves are interfering with each other.  
This depends mainly on the type of changes that need to be made during rollback 
and usually may happen when rolling back INDEX Updates in parallel.   


Fix
~~~~

Dynamically switch from parallel recovery to serial.  If you are in a clustered 
environment you will need to do this on all instances at the same time:

1. Find SMON&#039;s Oracle PID:

Example:

SQL&#062; select pid, program from v$process where program like &#039;%SMON%&#039;;

       PID PROGRAM
---------- ------------------------------------------------
         6 oracle@stsun7 (SMON)

2. Disable SMON transaction cleanup:

SVRMGR&#062; oradebug setorapid 
SVRMGR&#062; oradebug event 10513 trace name context forever, level 2

3. Kill the PQ slaves that are doing parallel transaction recovery. 
You can check V$FAST_START_SERVERS to find these.

4. Turn off fast_start_parallel_rollback:

	alter system set fast_start_parallel_rollback=false;

If SMON is recovering, this command might hang, if it does just control-C out of it.  You may need to try this many times to get this to complete (between SMON cycles).

5. Re-enable SMON txn recovery:

SVRMGR&#062; oradebug setorapid 
SVRMGR&#062; oradebug event 10513 trace name context off


References
~~~~~~~~~~~
NOTE 144332.1 
Parallel Rollback may hang database, Parallel query servers get 100% cpu]]></description>
		<content:encoded><![CDATA[<p>How to Disable Parallel Transaction Recovery When Parallel Txn Recovery is Active [ID 238507.1] </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>  修改时间 29-APR-2010     类型 PROBLEM     状态 PUBLISHED   </p>
<p>Checked for relevance on 18-Sep-2008<br />
Checked for relevance on 29-April-2010</p>
<p>Symptom(s)<br />
~~~~~~~~~~</p>
<p>Parallel Transaction Recovery is taking too long.</p>
<p>You can use V$TRANSACTION USED_UBLK to estimate how long the rollback is going<br />
to take but there is no formula for this.  If you shutdown the database after<br />
rollback has started, it will begin where it left off.  </p>
<p>You can also look at V$FAST_START_TRANSACTIONS for UNDOBLOCKSDONE<br />
versus UNDOBLOCKSTOTAL.</p>
<p>Change(s)<br />
~~~~~~~~~~</p>
<p>A large transaction got killed or rolled back.</p>
<p>Cause<br />
~~~~~~~</p>
<p>There are cases where parallel transaction recovery is not as fast as serial<br />
transaction recovery, because the pq slaves are interfering with each other.<br />
This depends mainly on the type of changes that need to be made during rollback<br />
and usually may happen when rolling back INDEX Updates in parallel.   </p>
<p>Fix<br />
~~~~</p>
<p>Dynamically switch from parallel recovery to serial.  If you are in a clustered<br />
environment you will need to do this on all instances at the same time:</p>
<p>1. Find SMON&#8217;s Oracle PID:</p>
<p>Example:</p>
<p>SQL&gt; select pid, program from v$process where program like &#8216;%SMON%&#8217;;</p>
<p>       PID PROGRAM<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
         6 oracle@stsun7 (SMON)</p>
<p>2. Disable SMON transaction cleanup:</p>
<p>SVRMGR&gt; oradebug setorapid<br />
SVRMGR&gt; oradebug event 10513 trace name context forever, level 2</p>
<p>3. Kill the PQ slaves that are doing parallel transaction recovery.<br />
You can check V$FAST_START_SERVERS to find these.</p>
<p>4. Turn off fast_start_parallel_rollback:</p>
<p>	alter system set fast_start_parallel_rollback=false;</p>
<p>If SMON is recovering, this command might hang, if it does just control-C out of it.  You may need to try this many times to get this to complete (between SMON cycles).</p>
<p>5. Re-enable SMON txn recovery:</p>
<p>SVRMGR&gt; oradebug setorapid<br />
SVRMGR&gt; oradebug event 10513 trace name context off</p>
<p>References<br />
~~~~~~~~~~~<br />
NOTE 144332.1<br />
Parallel Rollback may hang database, Parallel query servers get 100% cpu</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				作者：roger				</title>
				<link>http://www.killdb.com/2011/10/07/%e5%85%b3%e4%ba%8eparallel-rollback%e7%9a%84%e4%b8%80%e7%82%b9%e6%80%bb%e7%bb%93/#comment-221</link>
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Fri, 07 Oct 2011 14:50:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.killdb.com/?p=602#comment-221</guid>
					<description><![CDATA[DATABASE HANG DUE TO PARALLEL TRANSACTION RECOVERY [ID 464246.1] 

--------------------------------------------------------------------------------
 
  修改时间 18-OCT-2010     类型 PROBLEM     状态 PUBLISHED   

In this Document
  Symptoms
  Cause
  Solution



--------------------------------------------------------------------------------



Applies to: 
Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.4 - Release: 9.2 to 10.2
Information in this document applies to any platform.

Symptoms
Database is hanging. Undo tablespace is growing.

The hang encountered because of parallel transaction recovery as the systemstate dump shows the significant waits for &quot;Wait for a undo record&quot; and &quot;Wait for stopper event to be increased&quot;.

Cause
The systemstate dump shows the following waitevents:

SO: 70000008c9de498, type: 4, owner: 70000008c626cc0, flag: INIT/-/-/0x00 
(session) sid: 1099 trans: 0, creator: 70000008c626cc0, flag: (51) USR/- BSY/-/-/-/-/- 
DID: 0001-0008-00000003, short-term DID: 0000-0000-00000000 
txn branch: 0 
oct: 0, prv: 0, sql: 0, psql: 0, user: 0/SYS 
waiting for &#039;wait for stopper event to be increased&#039; blocking sess=0x0 seq=82 wait_time=0 
seconds since wait started=156 
=0, =0, =0 
Dumping Session Wait History 
for &#039;wait for stopper event to be increased&#039; count=1 wait_time=97720 =0, =0, =0 
for &#039;wait for stopper event to be increased&#039; count=1 wait_time=97681 =0, =0, =0 
for &#039;wait for stopper event to be increased&#039; count=1 wait_time=97676 =0, =0, =0 
for &#039;wait for stopper event to be increased&#039; count=1 wait_time=97676 ...

SO: 70000008c9d6a58, type: 4, owner: 70000008c628460, flag: INIT/-/-/0x00 
(session) sid: 1087 trans: 0, creator: 70000008c628460, flag: (41) USR/- BSY/-/-/-/-/- 
DID: 0001-000E-00000004, short-term DID: 0000-0000-00000000 
txn branch: 0 
oct: 0, prv: 0, sql: 0, psql: 0, user: 0/SYS 
O/S info: user: oracle, term: UNKNOWN, ospid: 2998446, machine: ct-db3 
program: oracle@ct-db3 (P000) 
waiting for &#039;wait for a undo record&#039; blocking sess=0x0 seq=69 wait_time=0 seconds since wait 
started=243 =0, =0, =0 
Dumping Session Wait History 
for &#039;wait for a undo record&#039; count=1 wait_time=97677 =0, =0, =0 
for &#039;wait for a undo record&#039; count=1 wait_time=97675 =0, =0, =0 
for &#039;wait for a undo record&#039; count=1 wait_time=97673 =0, =0, =0 
for &#039;wait for a undo record&#039; count=1 wait_time=97682 =0, =0, =0 
for &#039;wait for a undo record&#039; count=1 wait_time=97679 ...


The above 2 wait events are mainly meant for parallel transaction recovery.

Solution
Solution

======

To disable the parallel rollback by setting the following parameter

fast_start_parallel_rollback = false


Explanation

========

Sometimes Parallel Rollback of Large Transaction may become very slow. After killing a large running transaction (either by killing the shadow process or aborting the database) then database seems to hang, or SMON and parallel query servers taking all the available CPU. 

In fast-start parallel rollback, the background process SMON acts as a coordinator and rolls back a set of transactions in parallel using multiple server processes. 

Fast start parallel rollback is mainly useful when a system has transactions that run a long time before a commit, especially parallel Inserts, Updates, Deletes operations. When SMON discovers that the amount of recovery work is above a certain threshold, it automatically begins parallel rollback by dispersing the work among several parallel processes. 

There are cases where parallel transaction recovery is not as fast as serial transaction recovery, because the PQ slaves are interfering with each other. It looks like the changes made by this transaction cannot be recovered in parallel without causing a performance problem. The parallel rollback slave processes are most likely contending for the same resource, which results in even worse rollback performance compared to a serial rollback.]]></description>
		<content:encoded><![CDATA[<p>DATABASE HANG DUE TO PARALLEL TRANSACTION RECOVERY [ID 464246.1] </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>  修改时间 18-OCT-2010     类型 PROBLEM     状态 PUBLISHED   </p>
<p>In this Document<br />
  Symptoms<br />
  Cause<br />
  Solution</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Applies to:<br />
Oracle Server &#8211; Enterprise Edition &#8211; Version: 9.2.0.1 to 10.2.0.4 &#8211; Release: 9.2 to 10.2<br />
Information in this document applies to any platform.</p>
<p>Symptoms<br />
Database is hanging. Undo tablespace is growing.</p>
<p>The hang encountered because of parallel transaction recovery as the systemstate dump shows the significant waits for &#8220;Wait for a undo record&#8221; and &#8220;Wait for stopper event to be increased&#8221;.</p>
<p>Cause<br />
The systemstate dump shows the following waitevents:</p>
<p>SO: 70000008c9de498, type: 4, owner: 70000008c626cc0, flag: INIT/-/-/0x00<br />
(session) sid: 1099 trans: 0, creator: 70000008c626cc0, flag: (51) USR/- BSY/-/-/-/-/-<br />
DID: 0001-0008-00000003, short-term DID: 0000-0000-00000000<br />
txn branch: 0<br />
oct: 0, prv: 0, sql: 0, psql: 0, user: 0/SYS<br />
waiting for &#8216;wait for stopper event to be increased&#8217; blocking sess=0x0 seq=82 wait_time=0<br />
seconds since wait started=156<br />
=0, =0, =0<br />
Dumping Session Wait History<br />
for &#8216;wait for stopper event to be increased&#8217; count=1 wait_time=97720 =0, =0, =0<br />
for &#8216;wait for stopper event to be increased&#8217; count=1 wait_time=97681 =0, =0, =0<br />
for &#8216;wait for stopper event to be increased&#8217; count=1 wait_time=97676 =0, =0, =0<br />
for &#8216;wait for stopper event to be increased&#8217; count=1 wait_time=97676 &#8230;</p>
<p>SO: 70000008c9d6a58, type: 4, owner: 70000008c628460, flag: INIT/-/-/0x00<br />
(session) sid: 1087 trans: 0, creator: 70000008c628460, flag: (41) USR/- BSY/-/-/-/-/-<br />
DID: 0001-000E-00000004, short-term DID: 0000-0000-00000000<br />
txn branch: 0<br />
oct: 0, prv: 0, sql: 0, psql: 0, user: 0/SYS<br />
O/S info: user: oracle, term: UNKNOWN, ospid: 2998446, machine: ct-db3<br />
program: oracle@ct-db3 (P000)<br />
waiting for &#8216;wait for a undo record&#8217; blocking sess=0x0 seq=69 wait_time=0 seconds since wait<br />
started=243 =0, =0, =0<br />
Dumping Session Wait History<br />
for &#8216;wait for a undo record&#8217; count=1 wait_time=97677 =0, =0, =0<br />
for &#8216;wait for a undo record&#8217; count=1 wait_time=97675 =0, =0, =0<br />
for &#8216;wait for a undo record&#8217; count=1 wait_time=97673 =0, =0, =0<br />
for &#8216;wait for a undo record&#8217; count=1 wait_time=97682 =0, =0, =0<br />
for &#8216;wait for a undo record&#8217; count=1 wait_time=97679 &#8230;</p>
<p>The above 2 wait events are mainly meant for parallel transaction recovery.</p>
<p>Solution<br />
Solution</p>
<p>======</p>
<p>To disable the parallel rollback by setting the following parameter</p>
<p>fast_start_parallel_rollback = false</p>
<p>Explanation</p>
<p>========</p>
<p>Sometimes Parallel Rollback of Large Transaction may become very slow. After killing a large running transaction (either by killing the shadow process or aborting the database) then database seems to hang, or SMON and parallel query servers taking all the available CPU. </p>
<p>In fast-start parallel rollback, the background process SMON acts as a coordinator and rolls back a set of transactions in parallel using multiple server processes. </p>
<p>Fast start parallel rollback is mainly useful when a system has transactions that run a long time before a commit, especially parallel Inserts, Updates, Deletes operations. When SMON discovers that the amount of recovery work is above a certain threshold, it automatically begins parallel rollback by dispersing the work among several parallel processes. </p>
<p>There are cases where parallel transaction recovery is not as fast as serial transaction recovery, because the PQ slaves are interfering with each other. It looks like the changes made by this transaction cannot be recovered in parallel without causing a performance problem. The parallel rollback slave processes are most likely contending for the same resource, which results in even worse rollback performance compared to a serial rollback.</p>
]]></content:encoded>
						</item>
			</channel>
</rss>
