Oracle等待事件Enqueue CI:Cross Instance Call Invocation
SQL> col ksqsttyp for a20 SQL> col ksqstrsn for a20 SQL> col ksqstexpl for a80 SQL> set linesize 200 pagesize 2000; SQL> select ksqsttyp,ksqstrsn,ksqstexpl from x$ksqst where ksqsttyp='CI';KSQSTTYP KSQSTRSN KSQSTEXPL -------------------- -------------------- -------------------------------------------------------------------------------- CI contention Coordinates cross-instance function invocationsSQL> show parameter cluster_databaseNAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean FALSE cluster_database_instances integer 1SQL> select * from v$enqueue_stat where eq_type='CI';INST_ID EQ TOTAL_REQ# TOTAL_WAIT# SUCC_REQ# FAILED_REQ# CUM_WAIT_TIME ---------- -- ---------- ----------- ---------- ----------- -------------1 CI 595 0 595 0 0
当系统中出现有大量这种跨实例后台进程调用时,将出现CI队列锁的争用。假设在一个RAC场景中,同时有大量的回话开始对不同的数据表执行TRUNCATE截断操作,TRUNCATE的一个前提是在所有实例上(因为对象表的dirty buffer可能分布在多个实例上)发生对象级别的检查点(object level checkpoint),检查点发生时CKPT进程会通知DBWR写出指定对象表相关的脏块,DBWR需要扫描Buffer Cache以找出脏块,而如果Buffer Cache很大那么扫描将花费大量的时间,而在此过程中前台进程将一直排他地持有着本地的CI队列锁,这就将造成CI锁的严重争用。 为了减少CI队列锁地争用,我们第一步所要做的是找出实际的Cross Instance call跨实例调用的类型。这里要另外提一下的是在10g以前不管是v$session_wait或statspack中都不会将enqueue锁等待事件的具体enqueue lock类型写明,一般需要我们从p1/p2/p3列中找出enqueue的具体身份,例如"WAIT #1: nam='enqueue' ela= 910796 p1=1128857606 p2=1 p3=4",这里的p1为1128857606也就是16进制的43490006,高位的'4349'转换为ascii码也就是'CI',而这里的p2/p3对应为V$lock中的ID1/ID2,ID1=1代表了"Reuse (checkpoint and invalidate) block range",ID2=4代表了"Mounted excl, use to allocate mechanism"。 具体ID1/ID2代表的含义在不同版本中有所变化,可以参考下表:
Id1, Id2 Combination:Oracle 10gR127 TO 29 *Same as 9i R230 process waiters after row cache requeue31 Active Change Directory extent relocation32 block change tracking state change33 kgl mulitversion obsolete34 set previous resetlogs data35 set recovery destination pointer36 fast object reuse request37 test ksbcic()38 ASM diskgroup discovery wait39 ASM diskgroup release40 ASM push DB updates41 ASM add ACD chunk42 ASM map resize message43 ASM map lock message44 ASM map unlock message (phase 1)45 ASM map unlock message (phase 2)46 ASM generate add disk redo marker47 ASM check of PST validity48 ASM offline disk CIC49 Logical Standby Sync Point SCN50 update SQL Tuning Base existence bitvector51 PQ induced Checkpointing52 ASM F1X0 relocation53 Scheduler autostart54 KZS increment grant/revoke counter55 ASM disk operation message56 ASM I/O error emulation57 DB Supp log cursor invalidation58 Cache global range invalidation59 Cache global object invalidation60 ASM Pre-Existing Extent Lock wait61 Perform a ksk action through DBWR62 ASM diskgroup refresh waitOracle 10gR230 to 62 *Same as 10gR163 KCBO object checkpoint64 KCBO object pq checkpoint65 global health check event66 Oracle Label Security refresh67 thread internal enable68 cross-instance registration69 KGL purge unused subheaps70 clear pin instance flag71 Rolling operations CICOracle 9iR2Id1 Meaning~~~ ~~~~~~25 TO 26 *Same as 9i R127 set Database Force Logging mode28 invalidate cached file address translations29 Cursor Unauthorize Mode30 snapshot too old diagnosis31 process waiters after row cache requeueOracle 9iR1Id1 Meaning~~~ ~~~~~~~~18 TO 24 *Same as Oracle 8i25 Update Dscn Tracking (ktcndt)26 Purge dictionary Object number CacheOracle 8iId1 Meaning~~~ ~~~~~~~0 TO 17 *Same as Oracle 8(please see "Oracle8*" for the Meaning)18 Object reuse request19 Rolling release checks20 Propagate begin backup scn for a file21 Refresh top plan (for db scheduler)22 Clear checkpoint progress record23 Drop temp file24 Quiesce database RestrictedId2 Meaning~~~ ~~~~~~~0x01 Used to pass in parameters0x02 Used to invoke the function in backgroud process0x03 Used to indicate the foreground has not returned0x04 Mounted excl, use to allocate mechanism0x05 Used to queue up interested clientsOracle 8*Id1 Meaning~~~ ~~~~~~~0 Checkpoint block range1 Reuse (checkpoint and invalidate) block range2 LGWR Checkpointing and Hot Backup3 DBWR syncronization of SGA with control file4 Log file add/drop/rename notification5 Write buffer for CR read6 Test call7 Invalidate KCK cache in all instances8 Alter rollback segment optimal9 Signal Query Servers/coordinator10 Create Remote parallel query Server11 Set Global Partitions12 Stop Disk Writes13 Drop Sort Segments14 Release unused space from Sort Segments15 Instance Recovery for Parallel operation Group16 Validate parallel slave Lock Value17 Check transaction state objects18 Flush blocks in object19 Rolling release checks20 Propagate begin backup scn for a file21 Clear checkpoint progress recordOracle 7Id1 Meaning~~~ ~~~~~~~0 Flush buffers for reuse as new class1 LGWR checkpointing and Hot Backup2 DBWR synchronization of SGA with control file3 Log file add/drop/rename notification4 Write buffer for CR read5 Test Call6 Invalidate KCK cache in all instances7 Alter rollback segment optimal8 Signal Query Servers/coordinator9 Create Remote Parallel Query Server10 Set Global Partitions11 Stop Disk Writes12 Drop Sort Segments13 Release unused space from Sort Segments14 Instance Recovery for Parallel operation Group15 Validate parallel slave Lock Value16 Check Transaction State ObjectsId2 Meaning~~~ ~~~~~~~1 Pass in Parameters2 Invoke the call in background process3 Foreground has not returned yet4 Used to allocate the CI call5 Used to queue up interested clients
Oracle等待事件Enqueue CI:Cross Instance Call Invocation相关推荐
- oracle redo wait较高,【案例】Oracle等待事件latch:row cache objects原因和解决办法
[案例]Oracle等待事件latch:row cache objects原因和解决办法 时间:2016-11-05 13:41 来源:Oracle研究中心 作者:HTZ 点击: 次 天萃 ...
- ORACLE等待事件相关
一.等待事件发展 oracle等待事件引入,可以更加细粒度直观地观察Oracle行为,提供oracle优化入口,大致分为三个阶段: 以命中为主要参考指标:以各种命中率为主要的优化入口依据,常见的有&q ...
- 浅析Oracle等待事件
oracle 等待事件 一.简述 Oracle等待事件是在Oracle 7.0.12中引入的,当时等待事件大致有100多个:在Oracle 8.0中Oracle等待事件数目增加到150多个,在Orac ...
- oracle library cache lock,【案例】Oracle等待事件library cache lock产生原因和解决办法...
[案例]Oracle等待事件library cache lock产生原因和解决办法 时间:2016-12-07 18:56 来源:Oracle研究中心 作者:网络 点击: 次 天萃荷净 O ...
- CPU值满resmgr:cpu quantum造成的Oracle等待事件解决办法
cpu quantum造成的Oracle等待事件解决办法 不少接触数据库的朋友有一个困扰已久的问题--resmgr:cpu quantum.已经遇过不少次这种CPU突然全绿的情况,通过隐含参数屏蔽了一 ...
- Oracle Study之--Oracle等待事件(3)
Oracle Study之--Oracle等待事件(3) Db file parallel read 这是一个很容易引起误导的等待事件,实际上这个等待事件和并行操作(比如并行查询,并行DML)没有关系 ...
- oracle顺序读等待,Oracle Study之--Oracle等待事件(4)
Oracle Study之--Oracle等待事件(4) Db file scattered read这个等待事件在实际生产库中经常可以看到,这是一个用户操作引起的等待事件,当用户发出每次I/O需要读 ...
- ORACLE 等待事件的分类
等待事件是总个性能调优的入口. 在总体查看ORACLE数据库性能时,总是会先看TOP N WAIT,比如: 下面我切了一段我的AWR报表内容: Top Timed Events '*' C ...
- oracle logfile sync,oracle等待事件3构造一个DirectPathwrite等待事件和构造一个LogFileSync等待事件...
第一篇<oracle等待事件1分别用表和索引上数据的访问来产生dbfilescatteredread等待事件>http://leonarding.blog.51cto.com/604552 ...
最新文章
- 硅谷初创公司工资期权调查报告出炉,你羡慕吗?
- 多协议标签交换(MPLS)技术的潜在弱点—Vecloud
- UVA 11259 Coin Changing Again
- 1132 Cut Integer (20 分)【难度: 简单 / 知识点: 模拟】
- 北京内推 | 华为CloudAI机器视觉产品部招聘计算机视觉见习研究员
- 文件包含常见绕过方法
- rabbitmq中消息的存储
- java并发(一):初探线程的创建
- 使用客户端行为来丰富 ASP.NET 的 DataGrid
- java concurrent int_Java高级特性系列--Concurrent
- 线程池工厂方法newFixedThreadPool()和newCachedThreadPool()
- 利用LR做性能测试中出现的常见问题解决方案
- SOUI自定义控件(3)
- 如何用css绘制一个三角形
- html基本标记练习钱塘湖春行,《钱塘湖春行》练习题及答案
- Python面试题:a='1234567890abc' 半金字塔输出
- 内网渗透-WindowsLinux痕迹清除
- ISCC-2019部分wp
- Android程序员现状:没有架构师的命,却得了架构师的病!
- python中tan怎么表示_python中Tan的逆(tan-1) - python