TOMSYAN 发表于 2011-12-23 01:30

11G db file async I/O submit等待事件

<DIV>在11G的环境中,可能会遇到<FONT color=#f00000>db file async I/O submit等待事件</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>SQL&gt; select event from v$session_wait where wait_class&lt;&gt;'Idle';</DIV>
<DIV>EVENT<BR>----------------------------------------------------------------<BR>SQL*Net message to client<BR>Data file init write<BR><FONT color=#f00000>db file async I/O submit<BR>db file async I/O submit<BR></FONT>log file parallel write<BR>buffer busy waits<BR>db file sequential read<BR>db file sequential read</DIV>
<DIV>&nbsp;</DIV>
<DIV>在11G中,默认异步IO是打开的:<BR>SQL&gt; show parameter disk </DIV>
<DIV>NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VALUE<BR>------------------------------------ ----------- ------------------------------<BR>asm_diskgroups&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string<BR>asm_diskstring&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string<BR><FONT color=#f00000>disk_asynch_io&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boolean&nbsp;&nbsp;&nbsp;&nbsp; TRUE</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>但是实际filesystemio_options并没有设置<BR>SQL&gt; show parameter filesystem</DIV>
<DIV>NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VALUE<BR>------------------------------------ ----------- ------------------------------<BR><FONT color=#f00000>filesystemio_options&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; none</FONT></DIV>
<DIV><FONT color=#f00000><BR></FONT>SQL&gt; select * from v$version;</DIV>
<DIV>BANNER<BR>--------------------------------------------------------------------------------<BR>Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production<BR>PL/SQL Release 11.2.0.1.0 - Production<BR>CORE&nbsp;&nbsp;&nbsp; 11.2.0.1.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Production<BR>TNS for Linux: Version 11.2.0.1.0 - Production<BR>NLSRTL Version 11.2.0.1.0 - Production</DIV>
<DIV>&nbsp;</DIV>
<DIV>metalink上说:</DIV>
<DIV><STRONG>'db file async I/O submit' should be treated as 'db file parallel write' in previous releases</STRONG>.</DIV>
<DIV>&nbsp;</DIV>
<DIV>通过修改参数<FONT color=#f00000>disk_asynch_io </FONT><FONT color=#000000>为FALSE,关闭异步IO</FONT></DIV>
<DIV><FONT color=#f00000></FONT>&nbsp;</DIV>
<DIV>SQL&gt; alter system set disk_asynch_io =false&nbsp;&nbsp; scope=spfile;</DIV>
<DIV>&nbsp;</DIV>
<DIV>System altered.</DIV>
<DIV>&nbsp;</DIV>
<DIV>重启数据库,至此此等待事件不在出现。</DIV>
<DIV>当然还可以通过修改参数filesystemio_options</DIV>
<DIV>&nbsp;</DIV>
<DIV>alter system set filesystemio_options =asynch scope=spfile。</DIV>
<DIV>&nbsp;</DIV>
<DIV>以下是metalink 的资料:</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>'db file async I/O submit' when FILESYSTEMIO_OPTIONS=NONE </STRONG></DIV>
<DIV>--------------------------------------------------------------------------------<BR>&nbsp;<BR>&nbsp; 修改时间 17-DEC-2010&nbsp;&nbsp;&nbsp;&nbsp; 类型 PROBLEM&nbsp;&nbsp;&nbsp;&nbsp; 状态 MODERATED&nbsp;&nbsp; </DIV>
<DIV><STRONG>In this Document</STRONG></DIV>
<DIV><BR>&nbsp; Symptoms<BR>&nbsp; Cause<BR>&nbsp; Solution<BR>&nbsp; References</DIV>
<DIV>&nbsp;</DIV>
<DIV>--------------------------------------------------------------------------------</DIV>
<DIV><BR>This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. </DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>Applies to: </STRONG></DIV>
<DIV><BR>Oracle Server - Enterprise Edition - Version: 11.2.0.2 and later&nbsp;&nbsp; <BR>Information in this document applies to any platform.</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>Symptoms</STRONG></DIV>
<DIV><BR>According to the Oracle documentation, the asynch is disabled for normal file systems if FILESYSTEMIO_OPTIONS=NONE. But, when setting DISK_ASYNCH_IO to TRUE, the wait event list shows 'db file async I/O submit'.</DIV>
<DIV>Using for example Note 237299.1 How To Check if Asynchronous I/O is Working On Linux&nbsp; to check if the asynch is enable shows synchronous IO; the kiocb is 0 running the steps from the note:</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#f00000>cat /proc/slabinfo |grep kio<BR>kioctx 50 84 320 12 1 : tunables&nbsp; 54 27 8 : slabdata 7 7 0<BR>kiocb&nbsp;&nbsp; 0&nbsp; 0 256 15 1 : tunables 120 60 8 : slabdata 0 0 0</FONT></DIV>
<DIV><FONT color=#f00000><BR></FONT>A second check is to collect the OS debugger trace on a database writer process:</DIV>
<DIV>&nbsp;</DIV>
<DIV>E.g.</DIV>
<DIV>trace –p &lt;DBWR pid&gt;</DIV>
<DIV><BR>If the IO calls are like pwrite64 then this is synchronous IO and if the IO calls are like io_getevents then this is asynch IO.</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>Cause</STRONG></DIV>
<DIV><STRONG><BR></STRONG>This is the expected behavior.</DIV>
<DIV>According to unpublished the Bug 9649885 DB FILE ASYNC I/O SUBMIT EVENT NOT TRACKED WHEN DISK_ASYCH_IO = TRUE, when DISK_ASYNCH_IO=TRUE, the wait event 'db file async I/O submit' is posted even if the IO calls cannot be performed asynchronously and this is the current behavior.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The tests show the following behavior:</DIV>
<DIV>disk_asynch_io filesystemio_options strace DBWR AIO DBWR waits<BR>FALSE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NONE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwrite64&nbsp;&nbsp;&nbsp; NO&nbsp; db file parallel write<BR>FALSE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ASYNCH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwrite64&nbsp;&nbsp;&nbsp; NO&nbsp; db file parallel write<BR>TRUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ASYNCH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; io_submit/&nbsp; YES db file parallel write<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; io_getevents<BR>TRUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NONE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwrite64&nbsp;&nbsp;&nbsp; NO&nbsp; db file async I/O submit</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>Solution</STRONG></DIV>
<DIV><BR>'db file async I/O submit' should be treated as 'db file parallel write' in previous releases. Changing the DISK_ASYCH_IO to FALSE removes the wait event 'db file async I/O submit'.<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
页: [1]
查看完整版本: 11G db file async I/O submit等待事件