資料庫日誌不斷報undo segment onlined的建議解決方法

paulyibinyi發表於2009-12-14

    最近客戶有套資料庫9.2.0.5 rac+aix,資料庫日誌不斷報undo segment onlined,而且效能有時下降,

根據metalink說法,建議採用以下兩種方法處理:
   
   1、切換unto tablespace ,也就是新建一個臨時undo tablespace,切換一下,待處理完畢後切換回來。

   2、可以用event="10511 trace name context forever, level 1"來disable  SMON去offline idle rollback segment的操作。

  以下是metalink詳細解釋

 Performance Slowdown During Heavy Undo Segment Onlining [ID 301432.1]  

--------------------------------------------------------------------------------
 
  修改時間 02-OCT-2009     型別 PROBLEM     狀態 PUBLISHED  

In this Document
  Symptoms
  Changes
  Cause
  Solution
  References

 

--------------------------------------------------------------------------------

 

 

Applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.5
This problem can occur on any platform.

Symptoms
Severe database performance slowdown.

Statspack report shows Wait Event "enqueue" with type "US" consuming a significant percentage of database time.

Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
-------------------------------------------- ------------ ----------- --------
enqueue 39,641 70,172 87.61

Enqueue activity for DB: CSP Instance: CSP Snaps: 2716 -2723
-> Enqueue stats gathered prior to 9i should not be compared with 9i data
-> ordered by Wait Time desc, Waits desc

Avg Wt Wait
Eq Requests Succ Gets Failed Gets Waits Time (ms) Time (s)
-- ------------ ------------ ----------- ----------- ------------- ------------
US 2,688 2,620 0 48 1,240,534.88 59,546

Alert.log shows lots of Undo Segments being onlined during this time interval, e.g.

Fri Mar 11 08:39:46 2005
Undo Segment 11 Onlined
Fri Mar 11 08:41:20 2005
Undo Segment 12 Onlined
Fri Mar 11 08:41:20 2005
Undo Segment 13 Onlined
Fri Mar 11 08:41:31 2005
Undo Segment 14 Onlined
Fri Mar 11 08:43:44 2005
Undo Segment 15 Onlined


Changes
Introduction of Automatic Undo Management may have been a recent change in some cases.
Cause
Large numbers of Undo Segment onlines are being performed.

Undo Segment online and offline operations require Serialization on US enqueue.

In transactional databases where incoming workload varies with time it is common for idle Undo Segments to be offlined (or even dropped before 9.2.0.4) by SMON after a while, only to be onlined once again during the next "wave" of incoming transactions.

This repetitive offlining and onlining of Undo Segments causes performance problems due to the US enqueue operations needed.

Solution
Prevent SMON from offlining idle Undo Segments using event 10511.

Set the following parameter in init.ora/spfile

event="10511 trace name context forever, level 1"

Then restart the database.

After the first onlinining of an Undo Segment, it will never be offlined and re-onlined.
So we will only get the "US" serialization once (on the first online after a db restart.)


References
BUG:3577781 - UNDO ONLINING CAUSES EXCESSIVE WAITS

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-622416/,如需轉載,請註明出處,否則將追究法律責任。

相關文章