High waits on control file sequential read (文档 ID 2277867.1)

In case we run into an issue where control file sequential read is the top event on the AWR report and we cannot see I/O issues on tablespace stats.

Example:

Tablespace IO Stats
ordered by IOs (Reads + Writes) desc
Tablespace Reads Av Rds/s Av Rd(ms) Av Blks/Rd 1-bk Rds/s Av 1-bk Rd(ms) Writes Writes avg/s Buffer Waits Av Buf Wt(ms)
SYSAUX 23,798 3 0.33 1.00 1,247 3.30 0 0 0 0.00
SYSTEM 13,242 2 0.27 1.00 155 1.84 0 0 0 0.00

Top 10 Foreground Events by Total Wait Time

Event Waits Total Wait Time (sec) Wait Avg(ms) % DB time Wait Class
DB CPU 172.9 46.3
control file sequential read 91,690 48.5 1 13.0 System I/O >>>>> almost 50% of db time!
gc current block busy 13 35 2692 9.4 Cluster

The control file sequential read Oracle metric indicates the process is waiting for blocks to be read from a control file. This happens in many cases. For example, while:

making a backup of the controlfiles -- rman in process
sharing information (between instances) from the controlfile -- RAC system
reading other blocks from the controlfiles
reading the header block

Because the controlfile contains the SCN's for the last transactions, the controlfiles are constantly being updated. Normally, the I/O associated with the controlfile is small, but you can see high controlfile waits in the following circumstances:

High DML periods - The controlfiles are continuously updated during DML (update) activity.
Conflicting DML - One common cause of high controlfile write waits is running batch updates while running an Oracle backup.
Bad disk placement - Placing several copies of a controlfile on the same disk platter can cause disk enqueues and a system-wide slowdown.
Too many control files - Remember, you have to write to all controlfiles.
Manual COMMITS and log switches - Custom code that issues frequent COMMIT processing must write to the controlfile, as also when switching log files.

Looking at the AWR report we can see:

IOStat by Filetype summary

'Data' columns suffixed with M,G,T,P are in multiples of 1024 other columns suffixed with K,M,G,T,P are in multiples of 1000
Small Read and Large Read are average service times, in milliseconds
Ordered by (Data Read + Write) desc

Filetype Name Reads: Data Reqs per sec Data per sec Writes: Data Reqs per sec Data per sec Small Read Large Read
Control File 71.1G 23.40 3.369M 1.2G 2.82 .056M 2.60 17.80

This means 71.1G on controlfile reads which is very huge.

rman@apsrp0189 (TNS V1-V3) begin dbms_rcvman.getRequiredS...
29,781 29,781 167 178.33 0.00 12.41 5mw55dp9p6nyt rman@apsrp0189 (TNS V1-V3) select nvl(max(al.recid), '0')...
11,022 11,022 167 66.00 0.00 4.59 gf87bnxzf9raf rman@apsrp0189 (TNS V1-V3) select db.version_time, db.con...
9,872 9,872 54 182.81 0.00 4.11 7u9ndtp0gcmu8 rman@apsrp0189 (TNS V1-V3) SELECT NVL(MAX(AL.NEXT_CHANGE#...

This means a backup is going on during that period this could be the cause of the high number of reads.

We need to examine:

1. Where the controlfiles are placed:

Are all in the same disk?

control_files +REDO01/<instance_name>/controlfile/current.256.856619303, +REDO02/spppr01/controlfile/current.256.856619303

2. Size of the control files

SQL> SELECT name FROM gv$controlfile;

SQL> SELECT * FROM gv$system_event WHERE event LIKE '%control%

SQL> SELECT event, wait_time, p1, p2, p3 FROM gv$session_wait WHERE event LIKE '%control%';

SQL> ALTER SESSION set events 'immediate trace name controlf level 3';

3. Check "Control File" for "IOStat by Filetype summary" of AWR report and compare the figure for both good and bad time: is there a big difference between good & bad time?

5. If log switch is slow (you can observe it in alert log), and you may also see excessive controlfile reads.

sampe 1:

IOStat by Function summary
'Data' columns suffixed with M,G,T,P are in multiples of 1024 other columns suffixed with K,M,G,T,P are in multiples of 1000
ordered by (Data Read + Write) desc
Function Name Reads: Data Reqs per sec Data per sec Writes: Data Reqs per sec Data per sec Waits: Count Avg Tm(ms)
RMAN 243G 106.15 70.11M 1M 0.02 0M 386           42.13
Others 530M 9.47 .149M 36M 0.62 .01M 34.7K          126.45   <-rman 备份调用了大部分资源,导致AVG time 只有126  ms 和 134 ms
LGWR 63M 1.13 .018M 32M 0.63 .009M 5270      134.38
DBWR 0M 0.00 0M 5M 0.18 .001M 0
Direct Reads 1M 0.02 0M 1M 0.02 0M 0
Buffer Cache Reads 1M 0.03 0M 0M 0.00 0M 104 120.76
Direct Writes 0M 0.00 0M 0M 0.01 0M 0
TOTAL: 243.6G 116.79 70.277M 75M 1.48 .021M 40.5K 126.66

Top 10 Foreground Events by Total Wait Time

Event Waits Total Wait Time (sec) Wait Avg(ms) % DB time Wait Class
control file sequential read 28,888 3715.7 129 99.1 System I/O                             <- 间接导致控制文件读 I/O 达到  129 ms.
log file sync 179 106.7 596 2.8 Commit

查看使用到大量control file sequential read 的sql 消耗时间达到了10s 以上。

这是正常现象。

High waits on control file sequential read的更多相关文章

  1. [20181130]control file sequential read.txt

    [20181130]control file sequential read.txt --//昨天上午探究了大量控制文件读的情况,链接:http://blog.itpub.net/267265/vie ...

  2. control file sequential read 等待事件

    可能的原因 control file sequential read Reading from the control file. This happens in many cases. For ex ...

  3. db file sequential read (数据文件顺序读取)

    转载:http://www.dbtan.com/2010/04/db-file-sequential-read.html db file sequential read (数据文件顺序读取): db ...

  4. Oracle 等待事件 db file sequential read

    db file sequential read-数据文件顺序读取 等待事件: "db file sequential read" Reference Note (文档 ID 345 ...

  5. oracle之 db file sequential read等待事件优化思想

    为什么db file sequential read事件在full table scan操作中显现,为什么在多块读中为什么会有单块读存在 ? extent的大小 :当扩展区中的最后一组块仅是1个块,o ...

  6. 何时会发生db file sequential read等待事件?

    很多网友对系统内频繁发生的db file sequential read等待事件存有疑问,那么到底在那些场景中会触发该单块读等待事件呢? 在我之前写的一篇博文<SQL调优:Clustering ...

  7. db file sequential read等待事件 --转载

    db file sequential read db file sequential read等待事件有3个参数:file#,first block#,和block数量.在10g中,这等待事件受到用户 ...

  8. [转帖] db file sequential read及优化

    http://blog.itpub.net/12679300/viewspace-1185623/ db file sequential read及优化 原创 Oracle 作者:wzq609 时间: ...

  9. 10g ASM下修改control file的位置

    1.查看位置以及name是否正确 SQL> sho parameter name NAME TYPE VALUE ------------------------------------ --- ...

随机推荐

  1. Visual Studio 2012 与此版本的 Windows 不兼容 解决

    警告: [Window Title] 程序兼容性助手[Main Instruction] 此程序存在已知的兼容性问题[Expanded Information] Visual Studio 2012 ...

  2. sangfor-AF 地址转换以及各种模式理解(路由,透明,虚拟网线,混合模式)

    目的地址转换: 1.路由其实很简单的,其实你可以理解为路由器就好了2.透明和虚拟网线的区别:虚拟网线不对数据做任何的处理,你可以理解为不封装不拆包,直接丢给对端.而透明不一样,透明你可以把设备当做是交 ...

  3. dubbo的扩展点重构

    可扩展设计是框架要重点考虑的设计,因为它直接影响到框架的稳定性和功能的扩展,Dubbo扩展点重构.它在扩展性设计上踩过的坑,值得框架设计者借鉴学习. 第一步,微核心,插件式,平等对待第三方 即然要扩展 ...

  4. C# 获取Console的输入和输出 数据 (异步)

    using System ; using System .Diagnostics; using System .IO;   class Program {     static void Main() ...

  5. jdbc代码

    1.jdbcutiul的代码, package gz.itcast.util; import java.io.InputStream; import java.sql.Connection; impo ...

  6. jmeter性能指标

    Aggregate Report 是 JMeter 常用的一个 Listener,中文被翻译为“聚合报告”.今天再次有同行问到这个报告中的各项数据表示什么意思,顺便在这里公布一下,以备大家查阅. 如果 ...

  7. typedef 函数指针的用法

    转自:http://www.cnblogs.com/shenlian/archive/2011/05/21/2053149.html typedef 函数指针的用法 在网上搜索函数指针,看到一个例子. ...

  8. linux私有ftp搭建与创建新用户

    一.私有ftp搭建 以后补充 1. 搭建 2.修改配置文件 二.创建新用户 在linux搭建好私有ftp后,默认存放目录是 /var/ftp/ 我们有时候需要给外部公司之类的用,但又不想让他们直接在  ...

  9. Spring如何引用properties文件里的…

    [zt]Spring如何引用properties文件里的配置 来自 http://blog.csdn.net/luobo525/archive/2006/11/06/1370258.aspx 1.Pr ...

  10. 2018ACM-ICPC宁夏邀请赛 A-Maximum Element In A Stack(栈内最大值)

    Maximum Element In A Stack 20.91% 10000ms 262144K   As an ACM-ICPC newbie, Aishah is learning data s ...