2010年1月8日星期五

Oracle - statspack報告中的 log file sync是意義?

官方文檔中:
redo synch time

The elapsed time of all redo sync writes calls in 10s of milliseconds.

redo sync writes

Usually, redo that is generated and copied into the log buffer need not be flushed out to disk immediately. The log buffer is a circular buffer that LGWR periodically flushes. Redo sync writes increments when changes being applied must be written out to disk due to a commit.

參考eygle的文章:

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

.等待事件

Event                               Waits   Timeouts  Time (cs)    (ms)   /txn
---------------------------- ------------ ---------- ----------- ------ ------
log file sync 14,466 2 4,150 3 1.0
db file sequential read 17,202 0 2,869 2 1.2
latch free 24,841 13,489 2,072 1 1.7
direct path write 121 0 1,455 120 0.0
db file parallel write 1,314 0 1,383 11 0.1
log file sequential read 1,540 0 63 0 0.1
....
log file switch completion 1 0 3 30 0.0

refresh controlfile command 23 0 1 0 0.0
LGWR wait for redo copy 46 0 0 0 0.0
....
log file single write 4 0 0 0 0.0


我们看到,这里log file sync和db file parallel write等待同时出现了.

显然log file sync在等待db file parallel write的完成.



这里磁盘IO肯定存在了瓶颈,实际用户的redo和数据文件同时存放在Raid的磁盘上,存在性能问题.

需要调整.



 



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



我猜測的是redo log file 所在的physical disk 有問題,或者io的問題,大體上沒有猜錯。



但是看了一下eygle的文章2004年的,差距啊



準備仔細研究一下statspack!



參考:



http://www.eygle.com/statspack/statspack14-LogFileSync.htm

没有评论:

发表评论