91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle local write wait等待事件

發布時間:2020-05-18 08:40:48 來源:網絡 閱讀:1271 作者:斷情漠 欄目:關系型數據庫

Note 1

         TypicallyDBWR has to free up some buffers when you want to read something from the disk.During this process there are chances that you will be waiting for your local buffer(i.e blocks dirtied/invalidated by your session) to be written to disk. Duringthis time the waits are shown as local write waits.

當你想從此盤讀取數據,DBDW不得不清空一些buffer。在此過程中,可能會遇到等待你本地buffer寫入磁盤(如臟塊、失效的塊)。

Note 2

         Basically  'localwrite' wait happens (as the name indicates) when the session is waiting for itslocal (means writes pending because of its own operation)  write operation.This could happen typically if the underlying disc has some serious problems(one of the member disk crash in RAID-05 - for example, or a controllerfailure). That is why I might have said ' you never see this wait in the normaldatabases!'.  You may see this during (rarely) Truncating a largetable while most of the buffers of that table in cache. During TRUNCATEs thesession has to a local checkpoint and during this process, the session may waitfor 'local write' wait.

         基本上'localwrite' wait 表示會話在等待自己的寫操作。在磁盤發生嚴重問題時會發生(例如RAID 5的一個磁盤崩潰,或者磁盤控制器錯誤),這在正常的系統中極少發生,在TRUNCATE 一個大表而這個表在緩存中的時候,會話必需進行一個local checkpoint,這個時候會話會等待local session wait.

 

MOS 的文檔:

Truncates Taking Too Long... [ID334822.1]

提到了這個等待事件。

 

1          Cause

Processes that involve temporary tablesbeing truncated and repopulated in multiple, concurrent batch streams maypresent this situation.

涉及到臨時表被以并發多路并行形式truncaterepopulate,可能會出現此類情況。

The underlying problem is we have to writethe object's dirty buffers to disk prior to actually truncating or dropping theobject. This ensures instance recoverability and avoids a stuck recovery. Itseems at first glance perfectly reasonable to simply truncate a temporarytable, then repopulate for another usage. And then to do the temporarypoplulate/truncate operations in concurrent batches to increase throughput.

However, in reality the concurrenttruncates get bogged down as dbwr gets busy flushing those dirty block buffersfrom the buffer cache. You will see huge CI enqueue waits. The multipletruncate operations in concurrent streams absolutely kill throughput. This isspecially critical with large buffers.

 

2          Solution

         In9.2.0.5 and higher, it may also help to make sure a "temp"table that is frequently truncated have storage defined so that itoccupies one extent. But this workaround is only available as long as theextent is no more than 50% the size of the buffer cache. In non-RACenvironments the table still has to be smaller than 50% of the buffercache, but it allows the table to have up to 5 extents before falling backto the old algorithm. 

 

另外個例子(from internet):

一個數據倉庫的系統,在AWR報告中出現靠前的等待時間為LOCAL WRITE WAITEq:RO Fast Object Reuse. 分析相關的語句為TRUNCATE一個中間表。RO隊列的意義可以從V$LOCK_TYPE中檢索到。

SQL> SELECT DESCRIPTION FROM V$LOCK_TYPE WHERE TYPE='RO';

DESCRIPTION

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

Coordinates flushing of multiple objects

字面上的意思是協調清空多個對象。分析應用,該語句發生在ETL過程中,主要步驟為填充中間表,修改中間表,TRUNCATE中間表。在調度程序中有較多該流程的過程 .

       TRUNCATE DROP TABLE的時候, ORACLE必須使DATA BUFFER中所有該對象的數據塊失效或者刷新到磁盤,步驟為此時請求RO隊列鎖,找緩沖區中該對象的塊,并使其無效化或者刷新到磁盤,然后釋放RO鎖,如果多個進程并發地進行TRUNCATE的時候,就會在RO隊列上發生競爭,表現為等待事件Eq: RO fast object reuse. 如果TRUNCATE等待相關的塊刷新到磁盤,就表現為等待時間local write wait.

      這個問題的發生有兩個原因:1 I/O2 并行TRUNCATE.

      該問題不能通過增大BUFFER CACHE來解決,BUFFER CACHE 愈大,搜尋相關數據塊的時間愈長。

      處理的方法

可以對這種類型的中間表使用非默認塊大小的表空間,在CACHE BUFFER中設定不同塊大小的緩沖區。減小搜尋相關數據塊的時間,降低競爭。

2 保證DBWn寫入的效率。


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

梅河口市| 大港区| 嘉禾县| 绩溪县| 澄江县| 南宫市| 东阳市| 鄂托克前旗| 诸城市| 县级市| 江津市| 龙口市| 曲沃县| 洛隆县| 双桥区| 大安市| 西盟| 莱阳市| 台山市| 分宜县| 洛隆县| 耒阳市| 施甸县| 北京市| 枞阳县| 莱芜市| 临邑县| 海丰县| 襄城县| 新津县| 重庆市| 四川省| 长沙市| 张家港市| 南雄市| 肥城市| 兴和县| 麻阳| 毕节市| 达孜县| 全南县|