ORACLE CPU佔率高的程式

dragon路發表於2011-07-22
檢視( 107 ) / 評論( 0 ) / 評分( 0 / 0 )
        在AIX 5.3平臺下oracle 10.2.0.3測試環境中,經常發現某些oracle程式佔用很大的CPU資源,但這些程式並不存在v$session中,具體發現指令碼如下:

      SQL>select spid, pid, program from v$process
                 where addr not in (select paddr from v$session)

                SPID         PID   PROGRAM
               ------------ ------------------------------------------------
               1962208    18   xxxxx@xxxx (TNS V1-V3)
               2039826     49  xxxxx@xxxx (TNS V1-V3)

       檢視系統中發現該程式佔用CPU比例很高,每個程式消耗CPU大約20%資源。

       以下是該問題的具體分析:

      SQL> alter session set events ' immediate trace name systemstate level 266'
  或者
      SQL>oradebug setospid 1962208
      SQL>oradebug short_stack    
    
   查詢對應的 PROCESS 18,具體資訊如下:
Short stack dump: ksdxfstk+002c
Dump of memory from 0x070000009E5EF668 to 0x070000009E5EF870
   ................................
  Repeat 29 times
    ----------------------------------------
    SO: 70000009ea7aef8, type: 3, owner: 70000009e6322a0, flag: INIT/-/-/0x00
    (call) sess: cur 0, rec 0, usr 0; depth: 0
    ----------------------------------------
    SO: 7000000941eced0, type: 16, owner: 70000009e6322a0, flag: INIT/-/-/0x00
    (osp req holder)

  short stack分析:
          start ->main->opimai_real->sou2o->opidrv->ipiodrv->opiino->ksucrp
          ->kscnfy->ktsmg_register_tac+0074->sspuser ..........
 
sspuser()功能是給oradebug 請求的程式碼路徑,所以我們關注ktsmg_register_tac,通過metalink查詢,發現BUG:6084108與我們所發現的問題非常相似,在10.2.0.4解決該bug。

附錄:
其BUG:6084108具體問題描述:

PROBLEM:--------Intermittently, oracle process abnormally terminates due to ora-3115, thenconsumed one cpu 100%.  There was no v$session info so could not get sessioninformation to track down the root cause.STACK TRACE:------------ktsmg_register_tac 0074 kscnfy ksucrp opiino opiodr opidrv sou2o opimai_realmain暫時解決辦法,用作業系統命令kill -9 刪除以上程式。

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

相關文章