latch: CDC 与buffer busy waits

2023-12-24 17:02:53

latch: CDC 等待的是latch,引发的原因是大量同一块(一块内包含很多行)的读

buffer busy waits以及 free buffer 一般是DML导致的,修改块内容

Securefiles DMLs cause high 'buffer busy waits' & 'enq: TX - contention' wait events leading to whole database performance degradation.

Top 5 Timed Foreground Events

EventWaitsTime(s)Avg wait (ms)% DB timeWait Class
buffer busy waits887,09692,28310466.65Concurrency
enq: TX - contention2,245,62441,2441829.79Other
DB CPU2,0301.47
db file sequential read854,8611,52421.10User I/O
latch: cache buffers chains375,67263420.46Concurrency

$ sqlplus / as sysdba
col Parameter for a30
col "Session Value" for a20
col "Instance Value" for a20
SELECT a.ksppinm "Parameter", b.ksppstvl "Session Value", c.ksppstvl "Instance Value"
FROM x$ksppi a, x$ksppcv b, x$ksppsv c
WHERE a.indx = b.indx
AND a.indx = c.indx
AND lower(a.ksppinm) like '_securefiles_concurrency_estimate';

Parameter??????????????????????????????? Session Value??????? Instance Value
---------------------------------------- -------------------- --------------------
_securefiles_concurrency_estimate??????? 12?????????????????? 12

?
?

CAUSE

Bug 16375331?was filed seeking development team's feedback. It was closed as duplicate of?Bug 13593640?which was also closed as "Not a Bug".

There is no indication for of any abnormal behavior. There is a high contention on GBSASP.SYS_LOB0000017961C00006$$ when the default setting of the hidden parameter "_securefiles_concurrency_estimate" can not afford such high concurrency.


System state dumps show high 'enq: TX - contention' with no single blocker.

AWR report shows frequently executed DMLs against table TBPINSTANCES:
?

SQL ordered by Elapsed Time

Elapsed Time (s)ExecutionsElapsed Time per Exec (s)%Total%CPU%IOSQL IdSQL ModuleSQL Text
37,917.03027.380.630.723bfqvwrqqpgmrSeeBIS6 AS 20138UPDATE TBPINSTANCES SET cProce...
33,449.86024.160.620.710u0vxfm0k4ybaSeeBIS6 AS 20138INSERT INTO TBPINSTANCES (cID,...
21,192.09015.300.620.704xfhztsqxh1nqSeeBIS6 AS 20138UPDATE TBPINSTANCES SET cProce...
11,153.7208.060.610.73f4jzxjbazkyr1SeeBIS6 AS 20138UPDATE TBPINSTANCES SET cProce...
11,151.9808.050.630.70391f6569xdbr3SeeBIS6 AS 20138UPDATE TBPINSTANCES SET cState...
7,803.2305.640.620.748a1urkdd3y048SeeBIS6 AS 20138UPDATE TBPINSTANCES SET cState...
5,573.0804.020.620.7320a291w9y9ruySeeBIS6 AS 20138UPDATE TBPINSTANCES SET cProce...
3,343.8702.410.620.72899f7bqcg1rg7SeeBIS6 AS 20138UPDATE TBPINSTANCES SET cProce...
1,114.6600.800.620.6253b97nu5k9948SeeBIS6 AS 20138UPDATE TBPINSTANCES SET cProce...
1,113.9100.800.650.7482zk467usk116SeeBIS6 AS 20138UPDATE TBPINSTANCES SET cProce...




Segments by Buffer Busy Waits

OwnerTablespace NameObject NameSubobject NameObj. TypeBuffer Busy Waits% of Capture
GBSASPGBSLOBSYS_LOB0000017961C00006$$LOB1,005,66599.96
GBSASPGBSDTATJMSMESSAGESTABLE1240.01
GBSASPGBSIDXPK_TJMSMESSAGESINDEX940.01
GBSASPGBSIDXIDX_JMSMESSAGES_TXOP_TXIDINDEX510.01
GBSASPGBSIDXPK_TJMSTRANSACTIONSINDEX370.00

?

>>>> The contention seems to be on GBSASP.SYS_LOB0000017961C00006$$

?

LOBs are mainly designed for "once inserted + many times queried". They have not been designed for such great number of UPDATEs.

?
?

SOLUTION

1) Please increase the securefiles concurrency estimate as follows:
# sqlplus / as sysdba
alter system set "_securefiles_concurrency_estimate"=50 scope=spfile;

>>> then restart the instance for the new value to take effect.

By increasing this parameter, we expect less concurrency contention on the securefiles. This Parameter can only hold values only between 1 and 50 (both included).

?

2) Then, kindly recreate any table that contains securefiles especially the contended table.

Recreating the contended table is necessary as the hidden parameter "_securefiles_concurrency_estimate" is picked up for securefiles setting only during creation.

文章来源:https://blog.csdn.net/jnrjian/article/details/135182250
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。