RAC Wait Event: gcs log flush sync

https://www.hhutzler.de/blog/rac-wait-event_gcs_log_flush_sync/#overview-gcs-log-flush-sync-wait-event


Overview : gcs log flush sync wait event

  • Before sending a reconstructed CR block or CUR block, LMS will verify that corresponding redo vectors are flushed to disk.
  • LMS will flush request a log flush when there are uncomitted transactions within the required block -> Increasing commit frequence will increase this wait event too
  • Use lfsdiag.sql script to understand the wait time suffered by LGWR process
  • If the redo vector are not flushed, LMS on node2 need to wait for ‘gcs log flush sync’ event after requesting LGWR for a log flush, analogous to ‘log file sync’ event.
  • in a healthy database 90 % of GCS Log flush Sync should be 2ms ore less
  • Always check related instances for LOG FILE SYNC event as this event also reduces the Redo I/O bandwith
  • If gcs log flush sync wait event is significant then you need to understand your LGWR performance ( you may use lfsdiag,sql script )

Monitor gv$session wait events for LGWR, LMS processes

SQL> select w.inst_id, w.sid,w.program, w.event , w.STATE , w.SECONDS_IN_WAIT SEC_in_WAIT , w.P1TEXT || ': '  || w.P1 || ' - '    || w.P2TEXT  || ': '  || w.P2 || ' - '
      || w.P3TEXT || ': '  || w.P3 as P1_P2_P3 from gv$session w where
       program like '%LGWR%' or program like '%LMS%' or  program like '%JDBC%' order by program; INST_ID        SID PROGRAM                EVENT                 STATE         SEC_IN_WAIT P1_P2_P3
------- ---------- -------------------------------- ---------------------------- ------------------ ----------- ---------------------------------------------     
2      18 oracle@grac42.example.com (LGWR) log file parallel write      WAITED SHORT TIME  0 files: 1 - blocks: 1 - requests: 1
     2     13 oracle@grac42.example.com (LMS0) gcs log flush sync           WAITING            0 waittime: 30 - poll: 0 - event: 138

Gcs Log Flush Sync Wait histogramms

Script:@event_histogram_from_awr.sql

Acceptable gcs log flush sync histogramm (90 % of wait requests returns in less that 2 ms )
BEGIN_INTERVAL_TIME           Inst    SNAP_ID EVENT_NAME     WAIT_TIME_MILLI WAIT_COUNT
------------------------------ ---- ---------- ---------------- --------------- ----------
28-NOV-13 04.24.27.507 PM      1       876 gcs log flush sync              1      58940
                  1       876 gcs log flush sync              2      51775
                  1       876 gcs log flush sync            4    1433
                  1       876 gcs log flush sync              8        605
                  1       876 gcs log flush sync             16        271
                  1       876 gcs log flush sync             32        181
                  1       876 gcs log flush sync            64        133
                  1       876 gcs log flush sync            128      78
                  1       876 gcs log flush sync            256     7
                  1       876 gcs log flush sync            512    1 Gcs log flush sync wait histogramm with high wait times
28-NOV-13 04.25.58.021 PM      1       877 gcs log flush sync               1        304
                  1       877 gcs log flush sync               2        662
                  1       877 gcs log flush sync               4      11816
                  1       877 gcs log flush sync              8      46981  
                  1       877 gcs log flush sync              16      68740 
                  1       877 gcs log flush sync              32        202
                  1       877 gcs log flush sync              64        141
                  1       877 gcs log flush sync             128     83
                  1       877 gcs log flush sync             256      8
                  1       877 gcs log flush sync             512      1

References

http://www.orainternals.com/wp-content/uploads/2010/02/riyaj_advanced_rac_troubleshooting_rmoug_2010_doc.pdf

1、event_histogram_from_awr.sql

set linesize 180
set pagesize 200
col BEGIN_INTERVAL_TIME format A30
col instance_number format 99 head Inst
break on  BEGIN_INTERVAL_TIME
/*
define event_name="gcs log flush sync"
define event_name="log file sync"
*/
select snaps.begin_interval_time, snaps.instance_number,snaps.snap_id,hist.event_name , hist.wait_time_milli, hist.wait_count
  from dba_hist_event_histogram hist, dba_hist_snapshot snaps
 where snaps.snap_id = hist.snap_id and snaps.instance_number = hist.instance_number and
   snaps.begin_interval_time > sysdate - 1/12   -- sysdate - 1/12 -> display AWR reports from the last 2 hours
   AND hist.event_name = lower ('&&event_name')
 order by  snaps.snap_id , snaps.instance_number, wait_time_milli;
 

Contents

    1. Overview : gcs log flush sync wait event
    2. Monitor gv$session wait events for LGWR, LMS processes
    3. Gcs Log Flush Sync Wait histogramms
    4. References

Overview : gcs log flush sync wait event

  • Before sending a reconstructed CR block or CUR block, LMS will verify that corresponding redo vectors are flushed to disk.
  • LMS will flush request a log flush when there are uncomitted transactions within the required block -> Increasing commit frequence will increase this wait event too
  • Use lfsdiag.sql script to understand the wait time suffered by LGWR process
  • If the redo vector are not flushed, LMS on node2 need to wait for ‘gcs log flush sync’ event after requesting LGWR for a log flush, analogous to ‘log file sync’ event.
  • in a healthy database 90 % of GCS Log flush Sync should be 2ms ore less
  • Always check related instances for LOG FILE SYNC event as this event also reduces the Redo I/O bandwith
  • If gcs log flush sync wait event is significant then you need to understand your LGWR performance ( you may use lfsdiag,sql script )

Monitor gv$session wait events for LGWR, LMS processes

SQL> select w.inst_id, w.sid,w.program, w.event , w.STATE , w.SECONDS_IN_WAIT SEC_in_WAIT , w.P1TEXT || ': '  || w.P1 || ' - '    || w.P2TEXT  || ': '  || w.P2 || ' - '
      || w.P3TEXT || ': '  || w.P3 as P1_P2_P3 from gv$session w where
       program like '%LGWR%' or program like '%LMS%' or  program like '%JDBC%' order by program; INST_ID        SID PROGRAM                EVENT                 STATE         SEC_IN_WAIT P1_P2_P3
------- ---------- -------------------------------- ---------------------------- ------------------ ----------- ---------------------------------------------     
2      18 oracle@grac42.example.com (LGWR) log file parallel write      WAITED SHORT TIME  0 files: 1 - blocks: 1 - requests: 1
     2     13 oracle@grac42.example.com (LMS0) gcs log flush sync           WAITING            0 waittime: 30 - poll: 0 - event: 138

Gcs Log Flush Sync Wait histogramms

Script:@event_histogram_from_awr.sql

Acceptable gcs log flush sync histogramm (90 % of wait requests returns in less that 2 ms )
BEGIN_INTERVAL_TIME           Inst    SNAP_ID EVENT_NAME     WAIT_TIME_MILLI WAIT_COUNT
------------------------------ ---- ---------- ---------------- --------------- ----------
28-NOV-13 04.24.27.507 PM      1       876 gcs log flush sync              1      58940
                  1       876 gcs log flush sync              2      51775
                  1       876 gcs log flush sync            4    1433
                  1       876 gcs log flush sync              8        605
                  1       876 gcs log flush sync             16        271
                  1       876 gcs log flush sync             32        181
                  1       876 gcs log flush sync            64        133
                  1       876 gcs log flush sync            128      78
                  1       876 gcs log flush sync            256     7
                  1       876 gcs log flush sync            512    1 Gcs log flush sync wait histogramm with high wait times
28-NOV-13 04.25.58.021 PM      1       877 gcs log flush sync               1        304
                  1       877 gcs log flush sync               2        662
                  1       877 gcs log flush sync               4      11816
                  1       877 gcs log flush sync              8      46981  
                  1       877 gcs log flush sync              16      68740 
                  1       877 gcs log flush sync              32        202
                  1       877 gcs log flush sync              64        141
                  1       877 gcs log flush sync             128     83
                  1       877 gcs log flush sync             256      8
                  1       877 gcs log flush sync             512      1 资料二:

How To Solve “gcs log flush sync” Wait Event

Posted on December 30, 2018 by dbtut

In busy databases you may encounter this wait event. The general reason is the low redo log I/O performance or the slow interconnect connection.

As a solution of this wait event;

  • You can increase the performance of Interconnect network. For example, instead of 1g cards, you can create an interconnect interface on 10g cards.
  • You can move Redo log files onto faster disks.
  • Or, you can set the value of the _cr_server_log_flush parameter to false. This is not suggested.

You can change the value of the parameter as follows.

 
1
2
3
SQL> alter system set "_cr_server_log_flush"=false scope=both sid='*';
 
System altered.

RAC Wait Event: gcs log flush sync 等待事件 转的更多相关文章

  1. RAC 性能分析 - 'log file sync' 等待事件

    简介 本文主要讨论 RAC 数据库中的'log file sync' 等待事件.RAC 数据库中的'log file sync' 等待事件要比单机数据库中的'log file sync' 等待事件复杂 ...

  2. 完全揭秘log file sync等待事件-转自itpub

    原贴地址:http://www.itpub.net/thread-1777234-1-1.html   谢谢 guoyJoe 老大 这里先引用一下tanel poder大师的图: 什么是log fil ...

  3. Oracle数据库由dataguard备库引起的log file sync等待

    导读: 最近数据库经常出现会话阻塞的报警,过一会又会自动消失,昨天晚上恰好发生了一次,于是赶紧进行了查看,不看不知道,一看吓一跳,发现是由dataguard引起的log file sync等待.我们知 ...

  4. log file sync等待超高案例浅析

    监控工具DPA发现海外一台Oracle数据库服务器DB Commit Time指标告警,超过红色告警线(40毫秒左右,黄色告警是10毫秒,红色告警线是20毫秒),如下截图所示,生成了对应的时段的AWR ...

  5. log file sync等待超高一例

    这是3月份某客户的情况,原因是server硬件故障后进行更换之后,业务翻译偶尔出现提交缓慢的情况.我们先来看下awr的情况. 我们能够看到,该系统的load profile信息事实上并不高,每秒才21 ...

  6. log buffer space等待事件

    最近,我们有台服务器在delete操作期间发现一直在等待log buffer space,其他节点就没与这个问题.经查,向重做缓冲区上写入重做记录的进程,为了确保拥有重做缓冲区内必要的空间,需要获得r ...

  7. RAC性能分析 - gc buffer busy acquire 等待事件

    概述---------------------gc buffer busy是RAC数据库中常见的等待事件,11g开始gc buffer  busy分为gc buffer busy acquire和gc ...

  8. oracle之 等待事件LOG FILE SYNC (awr)优化

    log file sycn是ORACLE里最普遍的等待事件之一,一般log file sycn的等待时间都非常短 1-5ms,不会有什么问题,但是一旦出问题,往往都比较难解决.什么时候会产生log f ...

  9. ORACLE等待事件: log file parallel write

    log file parallel write概念介绍 log file parallel write 事件是LGWR进程专属的等待事件,发生在LGWR将日志缓冲区(log_buffer)中的重做日志 ...

随机推荐

  1. PHP全栈学习笔记11

    连接MySQL mysql_connect(servername,username,password); 面向对象: <?php $servername = "localhost&qu ...

  2. vscode创建net core控制台程序

    vscode近来深受的开发人员的喜爱.在下的前端同事们也纷纷使用vscode.在下就想了我等后端程序员也可以用vscode写C#代码.毕竟是从宇宙第一IDE  ----Visual Studio衍生的 ...

  3. IDEA:Maven项目找不到mapper文件 无法自动映射

    如果你发现所有的功能都报找不到映射的错,有可能是因为mapper文件没有被编译 在eclipse中,把资源文件放在src下,是可以被编译的 但是在idea中,直接把资源文件放在src下,如果不进行设置 ...

  4. ubuntu-18.04 设置开机启动脚本-亲测有效

    ubuntu-18.04不能像ubuntu14一样通过编辑rc.local来设置开机启动脚本,通过下列简单设置后,可以使rc.local重新发挥作用. 2.将下列内容复制进rc-local.servi ...

  5. 从壹开始前后端分离【 .NET Core2.0 +Vue2.0 】框架之二 || 后端项目搭建

    前言 至于为什么要搭建.Net Core 平台,这个网上的解释以及铺天盖地,想了想,还是感觉重要的一点,跨平台,嗯!没错,而且比.Net 更容易搭建,速度也更快,所有的包均有Nuget提供,不再像以前 ...

  6. Python自省

    自省就是通过一定机制查询到对象的内部结构,也就是运行时获取对象内部的属性以及类型,在Python中dir(),type(), hasattr(), isinstance()都是很好的自省例子 #!/u ...

  7. 搞懂Redis RDB和AOF持久化及工作原理

    前言 因为Redis的数据都储存在内存中,当进程退出时,所有数据都将丢失.为了保证数据安全,Redis支持RDB和AOF两种持久化机制有效避免数据丢失问题.RDB可以看作在某一时刻Redis的快照(s ...

  8. The openssl extension is required for SSL/TLS protection but is not available

    今天使用composer update发现报错:The openssl extension is required for SSL/TLS protection but is not availabl ...

  9. mysql判断条件不存在插入存在更新某字段

    insert into mst_sequence(seq_type, seq_desc, seq_date, seq_no, create_time) VALUES('CK', 'XXX', NOW( ...

  10. spring cloud feign 文件上传和文件下载

    文件上传参考文档:http://blog.didispace.com/spring-cloud-starter-dalston-2-4/ 文件下载参考文档:https://blog.csdn.net/ ...