enq: TX - allocate ITL entry 多产生于高并发事务的场景,出现这个事件可以调整 initrans、pctfree。

ITL、PCTFREE 对表默认是 1、10
ITL、PCTFREE 对索引默认是 2、10

initrans = 30
pctfree = 30

重建索引,重新生成表。

以下为 MOS 文章

Troubleshooting waits for ‘enq: TX - allocate ITL entry’ (Doc ID 1472175.1)

In this Document
Symptoms
Cause
Solution
Increase INITRANS
Increase PCTFREE
A Combination of increasing both INITRANS and PCTFREE
References

APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
Observe high waits for event enq: TX - allocate ITL entry
Top 5 Timed Foreground Events
Event Waits Time(s) Avg wait (ms) % DB time Wait Class
enq: TX - allocate ITL entry 1,200 3,129 2607 85.22 Configuration
DB CPU 323 8.79
gc buffer busy acquire 17,261 50 3 1.37 Cluster
gc cr block 2-way 143,108 48 0 1.32 Cluster
gc current block busy 10,631 46 4 1.24 Cluster

CAUSE
By default the INITRANS value for a table is one, and for an index is two. This defines an internal block structure called the Interested Transaction List (ITL). In order to modify data in a block, a process needs to use an empty ITL slot to record that the transaction is interested in modifying some of the data in the block. If there are insufficient free ITL slots then new ones will be taken in the free space reserved in the block. If this runs out and too many concurrent DML transactions are competing for the same data block we observe contention against the following wait event - “enq: TX - allocate ITL entry”.

You can see candidates for re-organisation due to ITL problems in the “Segments by ITL Waits” section of an Automatic Workload Repository (AWR) report:

Segments by ITL Waits

  • % of Capture shows % of ITL waits for each top segment compared
  • with total ITL waits for all segments captured by the Snapshot

Owner Tablespace Name Object Name Subobject Name Obj. Type ITL Waits % of Capture
OWNER_Name TS_NAME Object_Name TABLE 188 84.30
OWNER_Name TS_NAME Object_name P_R_06202012 TABLE PARTITION 35 15.70

SOLUTION
The main solution to this issue is to increase the ITL capability of the table or index by re-creating it and altering the INITRANS or PCTFREE parameter to be able to handle more concurrent transactions. This in turn will help to reduce “enq: TX - allocate ITL entry” wait events.

To reduce enq: TX - allocate ITL entry" wait events, We need to follow the steps below:

Increase INITRANS

1) Depending on the number of transactions in the table we need to alter the value of INITRANS. here it has been changed to 50:alter table <table name> INITRANS 50;2) Then re-organize the table using move (alter table <table_name> move;)3) Then rebuild all the indexes of this table as belowalter index <index_name> rebuild INITRANS 50;

Increase PCTFREE
If the issue is not resolved by increasing INITRANS then try increasing PCTFREE. Increasing PCTFREE holds more space back and so spreads the same number of rows over more blocks. This means that there are more ITL slots available, overall.

1) Spreading rows into more number of blocks will also helps to reduce this wait event.alter table <table name>  PCTFREE 20;
2) Then re-organize the table using move (alter table <table_name> move;)3) Rebuild indexalter index index_name  rebuild PCTFREE 20;

A Combination of increasing both INITRANS and PCTFREE


1) Set INITRANS to 50 and pct_free to 20alter table <table_name> PCTFREE 20  INITRANS 50;2) Re-organize the table using move (alter table <table_name> move;)3) Then rebuild all the indexes of the table as belowalter index <index_name>  rebuild PCTFREE 20 INITRANS 50;

NOTE: The table/index can be altered to set the new value for INITRANS. But the altered value takes effect for new blocks only. You need to rebuild the objects so that the blocks are initialized again.

For an index this means the index needs to be rebuild or recreated.

For a table this can be achieved through:
exp/imp
alter table move
dbms_redefenition
You can find information relating to other ‘enq: TX - …’ variants in the following articles:

Document 1476298.1 Resolving Issues Where ‘enq: TX - row lock contention’ Waits are Occurring
Document 873243.1 Troubleshooting ‘enq: TX - index contention’ Waits in a RAC Environment.
Document 1946502.1 Resolving Issues Where ‘enq: TX - contention’ Waits are Occurring

参考:
Doc ID 1472175.1

enq: TX - allocate ITL entry相关推荐

  1. oracle数据库enq: TX - allocate ITL entry性能诊断

    朋友公司的某铁路集团医保系统出现性能问题业务不能正常办理,下面是出现性能问题时的awr报告 从等待事件来看主要是出现了多处锁竞争.其中enq: TX - allocate ITL entry等待事件是 ...

  2. 关于enq: TX - allocate ITL entry的问题分析

    今天发现系统在下午1点左右的时候负载比较高,就抓取了一个最新的awr报告. Snap Id Snap Time Sessions Cursors/Session Begin Snap: 20892 2 ...

  3. Oracle死锁问题: enq: TX - allocate ITL entry

    之前遇到一个很有意思的问题,让自己学到了不少东西.分享给大家, 读下面的故事前,请先了解下面的几个概念 死锁:是指两个或两个以上的进程在执行过程中,由于竞争资源或者由于彼此通信而造成的一种阻塞的现象, ...

  4. oracle job enq tx,【学习笔记】Oracle等待事件 enq:TX–allocate ITL entry产生原因和解决办法...

    天萃荷净 运维DBA反映Oracle数据库出现enq:TX–allocate ITL entry等待事件,结合案例分析该等待事件产生原因和解决办法 今天在分析一份awr中发现了较为明显的enq: TX ...

  5. Oracle死锁问题: enq: TX - row lock contention

    前言 这篇文章也是记录近期遇到的问题以及从中学到的知识 ,近期一直在救火,有些问题自认为还是挺有代表性的,有兴趣的话再继续向下看 问题现象 线上反馈,执行批量处理EXCEL数据时,系统一直卡在进度滚动 ...

  6. 等待事件 enq:TX - row lock contention分析与解决

    6月30日,数据库发生了大量锁表.大概持续1小时,并且越锁越多.后来通过业务人员停掉程序,并kill掉会话后解决. 几天后再EM上查看CPU占用: CPU发生了明显等待. 主要是由于enq:TX - ...

  7. enq: TX - index contention

    enq: TX - index contention 常出现在高并发场景下,由于索引分裂产生的竞争等待.最常见的索引竞争一般发生在主键索引上,主键值从序列(sequence)中获取,每个事务都会生成一 ...

  8. 【故障处理】队列等待之enq: TX - row lock contention

    [故障处理]队列等待之enq: TX - row lock contention 1  BLOG文档结构图 2  前言部分 2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能, ...

  9. 队列等待之enq: TX - row lock contention

    [性能优化]队列等待之enq: TX - row lock contention 问题背景: 客户反映某条sql DELETE SHAREINNERDOC WHERE SOURCEID=:B1< ...

最新文章

  1. Spring Cloud Edgware新特性之一:解决Eureka中Jersey 1.x版本过旧的问题-不使用Jersey
  2. WSDL文件简介(附例子)
  3. 抓取html的地址怎么写,html js 获取地址栏参数
  4. Spring三种对象创建方式
  5. WordPress广告管理插件Adning Advertising1.5.8汉化版
  6. Storm 配置说明
  7. ubuntu安装最新版blender方法
  8. 最新的 iOS 申请证书与发布流程
  9. javascript(基础)_对数组的遍历方法总结(find, findIndex, forEach,)
  10. C# 判断是不是非负数
  11. Open3D-GUI系列教程(五)鼠标事件(拾取顶点)
  12. 信号与系统 傅里叶变换 拉普拉斯变换 z变换所有公式和性质 三个变换的联系 整理
  13. 微信聊天服务器端口号怎么查,如何查看服务的端口号
  14. gwo算法matlab源代码,智能优化算法应用:基于GWO优化BP神经网络 - 附代码
  15. depthimage-to-laserscan
  16. 【Git】如何修改本地仓库的用户名和邮箱
  17. Linux之离线安装Ganglia
  18. 2015年 行人检测总结4
  19. 编程之美--3.5最短摘要的生成
  20. 原生小程序实现折线图wx-charts(比echars体积小很多)

热门文章

  1. linux用iso文件启动,直接从硬盘启动Linux ISO镜像
  2. Mac-XQuartz-linux
  3. 星星之火-23: 什么是硬切换与软切换?先分手再谈新恋爱还是骑驴找马,脚踩两只船
  4. 【化学信息学】药物研发的过程和意义
  5. 【xshell】xshell到期提醒更新问题解决
  6. Netty 入门教程
  7. C语言编程求解:1到1000之间所有的素数
  8. 干货分享,4款安卓小众软件,每一个都值得保留
  9. ip route命令
  10. php7使用openssl_encrypt函数进行AES加密