1.  

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

  1.  

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

  1. 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 || ' - '
  2.       || w.P3TEXT || ': '  || w.P3 as P1_P2_P3 from gv$session w where
  3.        program like '%LGWR%' or program like '%LMS%' or  program like '%JDBC%' order by program;
  4.  
  5. INST_ID        SID PROGRAM                EVENT                 STATE         SEC_IN_WAIT P1_P2_P3
  6. ------- ---------- -------------------------------- ---------------------------- ------------------ ----------- ---------------------------------------------     
  7. 2      18 oracle@grac42.example.com (LGWR) log file parallel write      WAITED SHORT TIME  0 files: 1 - blocks: 1 - requests: 1
  8.      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

  1. Script:@event_histogram_from_awr.sql
  2.  
  3. Acceptable gcs log flush sync histogramm (90 % of wait requests returns in less that 2 ms )
  4. BEGIN_INTERVAL_TIME           Inst    SNAP_ID EVENT_NAME     WAIT_TIME_MILLI WAIT_COUNT
  5. ------------------------------ ---- ---------- ---------------- --------------- ----------
  6. 28-NOV-13 04.24.27.507 PM      1       876 gcs log flush sync              1      58940
  7.                   1       876 gcs log flush sync              2      51775
  8.                   1       876 gcs log flush sync            4    1433
  9.                   1       876 gcs log flush sync              8        605
  10.                   1       876 gcs log flush sync             16        271
  11.                   1       876 gcs log flush sync             32        181
  12.                   1       876 gcs log flush sync            64        133
  13.                   1       876 gcs log flush sync            128      78
  14.                   1       876 gcs log flush sync            256     7
  15.                   1       876 gcs log flush sync            512    1
  16.  
  17. Gcs log flush sync wait histogramm with high wait times
  18. 28-NOV-13 04.25.58.021 PM      1       877 gcs log flush sync               1        304
  19.                   1       877 gcs log flush sync               2        662
  20.                   1       877 gcs log flush sync               4      11816
  21.                   1       877 gcs log flush sync              8      46981  
  22.                   1       877 gcs log flush sync              16      68740 
  23.                   1       877 gcs log flush sync              32        202
  24.                   1       877 gcs log flush sync              64        141
  25.                   1       877 gcs log flush sync             128     83
  26.                   1       877 gcs log flush sync             256      8
  27.                   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

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

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

  1. 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 || ' - '
  2.       || w.P3TEXT || ': '  || w.P3 as P1_P2_P3 from gv$session w where
  3.        program like '%LGWR%' or program like '%LMS%' or  program like '%JDBC%' order by program;
  4.  
  5. INST_ID        SID PROGRAM                EVENT                 STATE         SEC_IN_WAIT P1_P2_P3
  6. ------- ---------- -------------------------------- ---------------------------- ------------------ ----------- ---------------------------------------------     
  7. 2      18 oracle@grac42.example.com (LGWR) log file parallel write      WAITED SHORT TIME  0 files: 1 - blocks: 1 - requests: 1
  8.      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

  1. Script:@event_histogram_from_awr.sql
  2.  
  3. Acceptable gcs log flush sync histogramm (90 % of wait requests returns in less that 2 ms )
  4. BEGIN_INTERVAL_TIME           Inst    SNAP_ID EVENT_NAME     WAIT_TIME_MILLI WAIT_COUNT
  5. ------------------------------ ---- ---------- ---------------- --------------- ----------
  6. 28-NOV-13 04.24.27.507 PM      1       876 gcs log flush sync              1      58940
  7.                   1       876 gcs log flush sync              2      51775
  8.                   1       876 gcs log flush sync            4    1433
  9.                   1       876 gcs log flush sync              8        605
  10.                   1       876 gcs log flush sync             16        271
  11.                   1       876 gcs log flush sync             32        181
  12.                   1       876 gcs log flush sync            64        133
  13.                   1       876 gcs log flush sync            128      78
  14.                   1       876 gcs log flush sync            256     7
  15.                   1       876 gcs log flush sync            512    1
  16.  
  17. Gcs log flush sync wait histogramm with high wait times
  18. 28-NOV-13 04.25.58.021 PM      1       877 gcs log flush sync               1        304
  19.                   1       877 gcs log flush sync               2        662
  20.                   1       877 gcs log flush sync               4      11816
  21.                   1       877 gcs log flush sync              8      46981  
  22.                   1       877 gcs log flush sync              16      68740 
  23.                   1       877 gcs log flush sync              32        202
  24.                   1       877 gcs log flush sync              64        141
  25.                   1       877 gcs log flush sync             128     83
  26.                   1       877 gcs log flush sync             256      8
  27.                   1       877 gcs log flush sync             512      1
  28.  
  29. 资料二:

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. break、continue以及return的区别

    break.continue以及return的区别如下: 1.break break用于完全结束一个循环,跳出循环体,不再执行下面的代码.对于多层循环嵌套,如果break语句出现在嵌套循环中的内循环时 ...

  2. Java数据结构和算法 - 链表

    Q: 为什么要引入链表的概念?它是解决什么问题的? A: 数组作为数据存储结构有一定的缺陷,在无序数组中,搜索是低效的:而在有序数组中,插入效率又很低:不管在哪一个数组中删除效率都很低:况且一个数组创 ...

  3. Android开发:Android Studio开发环境配置

    一.android studio下载: 1.Windows版: 下载地址:https://pan.baidu.com/s/1-sg4dN_2B5nn2YJf-C7XLQ 提取码:yedc 2.Mac版 ...

  4. 【朝花夕拾】Android性能篇之(七)Android跨进程通信篇

    前言 只要是面试高级工程师岗位,Android跨进程通信就是最受面试官青睐的知识点之一.Android系统的运行由大量相互独立的进程相互协助来完成的,所以Android进程间通信问题,是做好Andro ...

  5. ViewPagerWithImageDemo【ViewPager如何判断滑动到第一页和最后一页以及弹出对话框功能】

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 记录viewpager滑动的时候弹出对话框的功能(关键功能是滑动弹出对话框后,隐藏对话框的时候当前页可以还原到原位置),顺便判断首页 ...

  6. Chapter 5 Blood Type——32

    "Where are you all going, exactly?" He was still looking ahead, expressionless. “真的,你要去哪里? ...

  7. 关于C#的new与override

    先放出来两个基类和派生类: public class BaseClass { public virtual void Method1(string desc) { Console.WriteLine( ...

  8. 我爱Java系列之《JavaEE面试宝典》---【IO流面试总结】

    1.什么是比特(Bit),什么是字节(Byte),什么是字符(Char),它们长度是多少,各有什么区别 答案 Bit最小的二进制单位 ,是计算机的操作部分 取值0或者1 Byte是计算机操作数据的最小 ...

  9. 【Tomcat】Tomcat工作原理及简单模拟实现

    Tomcat应该都不陌生,我们经常会把写好的代码打包放在Tomcat里并启动,然后在浏览器里就能愉快的调用我们写的代码来实现相应的功能了,那么Tomcat是如何工作的? 一.Tomcat工作原理 我们 ...

  10. java 学习必备的软件,持续更新中

    小编会持续更新在学习Java过程中需要的软件以及各种文件: 话不多说,看行动! 一:JDK (1)JDK1.8(*64): 链接:https://pan.baidu.com/s/1vM0jNXn2CT ...