zoukankan      html  css  js  c++  java
  • log file parallel write&&log buffer space

    This wait event is used when waiting for the writes of redo records to the redo log files
    to complete. The waits occur in log writer (LGWR) as part of normal activity of copying
    records from the redo log buffer to the current online log
    
    
    这个等待事件是用于等待完成redo records 写入log files,这个事件发生在LGWR 将records从redo log buffer 写入到current online log.
    
    
    注:由于LGWR不象DBWR那样能够有多个,所以尽可能将REDO放在IO快的磁盘结构上,不要放在象RAID5这样的磁盘上。
    
    
    
    log buffer space:
    
    等待log buffer空间,由于会话写入log buffer快于LGWR写出的速度。
    
    
    
    log file parallel write: 它有三个参数,第一个参数表示将要写的文件个数,第二个参数表示要写入的block个数,第三个参数表示I/O请求的个数。
    测试:
    
    
    SQL> select * from v$mystat where rownum<2;
    
           SID STATISTIC#	   VALUE
    ---------- ---------- ----------
          1632	    0	       1
    
    SQL> truncate table test10;
    
    Table truncated.
    
    SQL> begin
    for i in 1 .. 1000
    loop
    insert into test10 select * from dba_objects;
    commit;
    end loop;
    end;  2    3    4    5    6    7  
      8  /
    
    
    SQL> select sid, event, p1, p2, p3
      from v$session_wait
     where event not like '%message%'
       and sid = 1651  2    3    4  ;
    
    
           SID EVENT								    P1	       P2	  P3
    ---------- ---------------------------------------------------------------- ---------- ---------- ----------
          1651 log file parallel write						     1	     3414	   3
    
    
           SID EVENT								    P1	       P2	  P3
    ---------- ---------------------------------------------------------------- ---------- ---------- ----------
          1632 log buffer space							     0		0	   0
    
    SQL> /
    
           SID EVENT								    P1	       P2	  P3
    ---------- ---------------------------------------------------------------- ---------- ---------- ----------
          1632 log file switch completion						     0		0	   0
    
    SQL> /
    
           SID EVENT								    P1	       P2	  P3
    ---------- ---------------------------------------------------------------- ---------- ---------- ----------
          1632 log buffer space							     0		0	   0
    
    1632 为用户会话进程:
    log buffer space 是用户commit触发的
    
    
    SQL> select  sid,program from v$session where sid=1651 ;
    
           SID PROGRAM
    ---------- ------------------------------------------------
          1651 oracle@jhoa (LGWR)
    
    
    log buffer space 是用户进程commit触发的
    
    log file parallel write 是lgwr进程引起的
    

  • 相关阅读:
    Improving .NET Application Performance and Scalability
    使用PerfView监测.NET程序性能(二):Perfview的使用
    【转载】Configure the max limit for concurrent TCP connections
    Constructor in depth
    使用PerfView监测.NET程序性能(一):Event Trace for Windows
    PHP工程师面临成长瓶颈
    关于前后端字符串长度计算不一致的问题
    最近踩坑汇总
    本周踩坑汇总
    上周踩坑汇总
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13352035.html
Copyright © 2011-2022 走看看