RAC Wait Event: gcs log flush sync 等待事件 转
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
Table of Contents
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
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
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
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 等待事件 转的更多相关文章
- RAC 性能分析 - 'log file sync' 等待事件
简介 本文主要讨论 RAC 数据库中的'log file sync' 等待事件.RAC 数据库中的'log file sync' 等待事件要比单机数据库中的'log file sync' 等待事件复杂 ...
- 完全揭秘log file sync等待事件-转自itpub
原贴地址:http://www.itpub.net/thread-1777234-1-1.html 谢谢 guoyJoe 老大 这里先引用一下tanel poder大师的图: 什么是log fil ...
- Oracle数据库由dataguard备库引起的log file sync等待
导读: 最近数据库经常出现会话阻塞的报警,过一会又会自动消失,昨天晚上恰好发生了一次,于是赶紧进行了查看,不看不知道,一看吓一跳,发现是由dataguard引起的log file sync等待.我们知 ...
- log file sync等待超高案例浅析
监控工具DPA发现海外一台Oracle数据库服务器DB Commit Time指标告警,超过红色告警线(40毫秒左右,黄色告警是10毫秒,红色告警线是20毫秒),如下截图所示,生成了对应的时段的AWR ...
- log file sync等待超高一例
这是3月份某客户的情况,原因是server硬件故障后进行更换之后,业务翻译偶尔出现提交缓慢的情况.我们先来看下awr的情况. 我们能够看到,该系统的load profile信息事实上并不高,每秒才21 ...
- log buffer space等待事件
最近,我们有台服务器在delete操作期间发现一直在等待log buffer space,其他节点就没与这个问题.经查,向重做缓冲区上写入重做记录的进程,为了确保拥有重做缓冲区内必要的空间,需要获得r ...
- RAC性能分析 - gc buffer busy acquire 等待事件
概述---------------------gc buffer busy是RAC数据库中常见的等待事件,11g开始gc buffer busy分为gc buffer busy acquire和gc ...
- oracle之 等待事件LOG FILE SYNC (awr)优化
log file sycn是ORACLE里最普遍的等待事件之一,一般log file sycn的等待时间都非常短 1-5ms,不会有什么问题,但是一旦出问题,往往都比较难解决.什么时候会产生log f ...
- ORACLE等待事件: log file parallel write
log file parallel write概念介绍 log file parallel write 事件是LGWR进程专属的等待事件,发生在LGWR将日志缓冲区(log_buffer)中的重做日志 ...
随机推荐
- 读Cassandra源码之并发
java 并发与线程池 java并发包使用Executor框架来进行线程的管理,Executor将任务的提交与执行过程分开,直接使用Runnable表示任务.future获取返回值.ExecutorS ...
- Python基础(max,min方法)
max函数(min函数使用方法一致): #-----------------max函数----------------- #max之简单层次的使用 li=[1,0,2,45,12,-2,7,9] re ...
- 最简单的SpringBoot整合MyBatis教程
前面两篇文章和读者聊了Spring Boot中最简单的数据持久化方案JdbcTemplate,JdbcTemplate虽然简单,但是用的并不多,因为它没有MyBatis方便,在Spring+Sprin ...
- HttpUtil 【判断网络连接的封装类】
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 该封装类主要包括以下功能: 判断是否有网络连接.判断是否有可用的网络连接: 判断是否是3G网络.判断mobile网络是否可用: 判断 ...
- Python编程从入门到实践笔记——操作列表
Python编程从入门到实践笔记——操作列表 #coding=utf-8 magicians = ['alice','david','carolina'] #遍历整个列表 for magician i ...
- Java服务器内存过高&CPU过高问题排查
一.内存过高 1.内存过高一般有两种情况:内存溢出和内存泄漏 (1)内存溢出:程序分配的内存超出物理机的内存大小,导致无法继续分配内存,出现OOM报错 (2)内存泄漏:不再使用的对象一直占据着内存不释 ...
- Springboot 系列(十三)使用邮件服务
在我们这个时代,邮件服务不管是对于工作上的交流,还是平时的各种邮件通知,都是一个十分重要的存在.Java 从很早时候就可以通过 Java mail 支持邮件服务.Spring 更是对 Java mai ...
- 使用jQuery增加或删除元素(内容)
使用jQuery增加或删除元素(内容):一.jQuery添加元素或内容:1,append() 方法:在被选元素的结尾插入元素或内容 2,prepend() 方法:被选元素的开头插入元素或内容. 3,a ...
- JavaSE面试题收集【仅有题目,答案自备】
一共有140个题目,可以参考下.一个“.java”源文件中是否可以包含多个类(不是内部类)?有什么限制?说说&和&&的区别在Java中如何跳出当前的多重嵌套循环?IO流的分类S ...
- WEB前端学习资源清单
常用学习资源 JS参考与基础学习系列 [MDN]JS标准参考 es6教程 JS标准参考教程 编程类中文书籍索引 深入理解JS系列 前端开发仓库 <JavaScript 闯关记> JavaS ...