Oracle dblink 发现Network 等待事件的分析 enq: KO - fast object checkpoint

所有的sql 通过dblink 查询全部等待中,

同一个SQL 20多个session 在跑,等待事件network,可能怀疑是不是网络断开了,导致没有返回

执行sql 如下:

BEGIN X@dblink ; END;

去到dblink 所在的db,发现20多个sql在执行一个sql,等待事件fast object check point

发现同一个sql的两个执行计划,最终发现PK index失效导致。

The following SELECT Statement shows different elapsed time from the original database to the coloning database.

For the excution plan, database parameters and rows of table are same on two databases.

SELECT *
FROM xxx MMT
WHERE mmt.xxx_id = 1661


1. On Original database: elapsed time is 10s.

2. On cloning database: elapsed time is 72s. 

The direct path read wait event from cloning database consumes 65s in the below 10046 trace.

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.04 0.03 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 7.75 72.17 611660 612506 0 1
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 4 7.79 72.21 611660 612506 0 1

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 173
Number of plan statistics captured: 1

Rows (1st) Rows (avg) Rows (max) Row Source Operation
---------- ---------- ---------- ---------------------------------------------------
  1 1 1 TABLE ACCESS FULL xxx (cr=612506 pr=611660 pw=0 time=0 us cost=167711 size=277 card=1)


Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net more data to client 1 0.00 0.00
enq: KO - fast object checkpoint 1 0.00 0.00
direct path read 38390 0.45 65.02 <<<<<<<<<<<<<<< direct path read : 65s
SQL*Net message from client 2 37.56 37.56

enq: KO - fast object checkpoint 1 0.00 0.00 --SGA 压力 不足

1.

"enq: KO - fast object checkpoint" is a wait event that is waiting until the checkpoints finishes in a particular object level.
At checkpoints, dirty buffers(updated buffers) on the buffer cache has to be written out to the disk by DBWR.
This checkpoint occurs by object level so if the process is not related to this particular object, the client should not have a delay from it.
However when DBWR process is under high load, it might affect to the performance.

2. 

All reporting queries are doing full table scans concurrently. Oracle uses direct path reads instead of db file scattered reads. And direct path reads require a checkpoint
 

SOLUTION

"_serial_direct_read"=NEVER

 WARNING: This solution is for non-Exadata system only. On Exadata system please don't disable direct path reads as it is critical to SmartIO benefits.

3. 就是cache不足, keep为0 所以不停的读盘

  • EM displays a huge amount of 'Application' and 'Other' on the 'Average active sessions' chart compared to normal
  • CKPT process consistently high in the process list
  • AWR top 5 wait events show :
    • "enq: KO - fast object checkpoint"
    • "reliable message"
  • ASH report Top SQL with Top Events shows queries with high waits on "enq: KO - fast object checkpoint"
  • A review of the tables in the query revealed that the table is defined to use the keep cache:

    ...
    STORAGE(INITIAL 327680 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
    BUFFER_POOL KEEP FLASH_CACHE    <<<######
    DEFAULT CELL_FLASH_CACHE DEFAULT)

  • The Initialization  parameters section in AWR report indicate that DB_KEEP_CACHE_SIZE was not set,

CAUSE

Tables involved in the process that is waiting on these events have buffer_pool = keep but the keep buffer pool was not configured on these instances.
Altering these tables to use the default buffer pool resolved the issue.

This issue was due to the excessive direct path reads that occurred as a result of the misconfiguration explained above and is dealt with in:
Bug 12530276 High 'direct path read' waits when buffer pools are not setup.
 

SOLUTION

1. The bug is fixed in 11.2.0.3

2. Workarounds:

  • Change the object definitions with keep buffer cache to use the default buffer cache
  • Allocate a keep buffer pool by setting parameter DB_KEEP_CACHE_SIZE to a non-zero value

CHANGES

CAUSE

It's due to buffer cache overflow on cloning database. So, the query become slow when data reads from the disk.

Note : The SGA_SIZE is 32G. However the the current usage of buffer cache(__db_cache_size) reaches to 30G. So, It indicted that buffer cache was almost fully used by other hot data.

SOLUTION

Options:

1. Flush buffer cache only when it's a test server.

    sqlplus / as sysdba


   SQL> alter system flush buffer_cache;

 - or -

2. keep the data of table into keep buffer cache

-- Check the table size
select BYTES/1024/1024 as SIZE_MB , table_name, owner from dba_segments where table_name = '<TABLE_NAME>';


-- Check KEEP buffer cache size


select component, current_size
from v$memory_dynamic_components
where component = 'KEEP buffer cache';


-- Increase keep buffer cache size if needed


alter system set db_keep_cache_size = 500m scope=both;

Note: the size 500m is an example.



-- Keep whole data of table into keep buffere cache
alter table <TABLE_NAME> storage( buffer_pool keep);

-- Check the table whether in keep buffer cache
select buffer_pool
from dba_tables
where table_name = '<TABLE_NAME>';

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/18493.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

白酒:白酒产地的地域文化与品牌形象

云仓酒庄豪迈白酒&#xff0c;作为中国白酒的一部分&#xff0c;其品牌形象深受产地的地域文化影响。地域文化是一个地区与众不同的文化传统和价值观&#xff0c;它影响着当地人的生活方式和审美观念&#xff0c;进而影响白酒的品牌形象。 首先&#xff0c;白酒产地的历史与传统…

windows句柄

引用&#xff1a;windows程序员面试指南 句柄 句柄是Windows系统中对象或实例的标识&#xff0c;这些对象包括模块、应用程序实例、窗口、控件、位图、GDI对象、资源、文件等。 数值上&#xff1a;是一个32位无符号整型值&#xff08;32位系统下&#xff09;&#xff1b; 逻辑…

Spark基础:Scala内建控制结构

在Scala中&#xff0c;控制结构是编程的基础&#xff0c;它们允许你根据条件执行不同的代码块&#xff0c;或者重复执行某些代码块。Scala提供了多种内建的控制结构&#xff0c;这些结构在Apache Spark的编程中同样非常有用。以下是一些Scala中常用的内建控制结构&#xff1a; …

ClickHouse安装教程:开启你的列式数据库之旅

ClickHouse是一个高性能的列式数据库管理系统&#xff0c;适用于在线分析处理&#xff08;OLAP&#xff09;。以下是ClickHouse的一些基本使用步骤&#xff1a; 下载二进制文件&#xff1a;您可以通过运行以下curl命令在Linux、FreeBSD或macOS上本地下载ClickHouse&#xff1a…

【算法】常用数据结构的优缺点

当然&#xff0c;下面是几种常用数据结构及其优缺点的详细描述&#xff0c;包括数组、链表、栈、队列、哈希表、树和图&#xff1a; 1. 数组 (Array) 优点&#xff1a; 快速访问&#xff1a; 通过索引可以在常数时间内(O(1))访问任意元素。空间局部性好&#xff1a; 数据在内…

Midjourney如何控制光照?提示词灵感来了!

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 Midjourney如何控制光照&#xff1f;提示词灵感来了&#xff01;文章目录 前言总结 前言 Midjourney v6 已经更新好久了&#xff0c;你知道有哪些可以控制光照效果的关键词吗…

全志T527 适配双目tp2815_mipi

一、硬件信息 TP2815&#xff1a; 确认硬件信息&#xff1a; 1、通信接口&#xff1a;TWI2总线&#xff0c;引脚组为PE1 、PE2 2、RESET脚&#xff1a; 二、软件配置 1、设备树 t527 dtsi: bsp/configs/linux-5.15/sun55iw3p1.dtsi t527 uboot-board.dts device/config/chi…

重学java 49 增强for

知之俞明&#xff0c;则行之越笃&#xff1b;行之愈笃&#xff0c;则知之愈益&#xff1b; —— 24.5.28 一、基本使用 1.作用: 遍历集合或者数组 2.格式: for(元素类型 变量名:要遍历的集合名或者数组名) 变量名就是代表的每一个元素 3.快捷键: 集合名或者数组名.for package …

ESXI8.0虚拟机和主机之间进行粘贴复制

1&#xff1a;默认情况下新建一个虚拟机是无法和主机之间进行粘贴复制操作的&#xff0c;主要是为了安全。 2&#xff1a;可以参考下面的文档进行操作&#xff0c;操作成功也只能复制粘贴数据&#xff0c;而无法复制粘贴文件或文件夹 https://knowledge.broadcom.com/externa…

组建RAID后安装系统时发现无法识别硬盘!

计算环境中,RAID(独立磁盘冗余阵列)是一种广泛采用的数据存储技术,它通过组合多个物理硬盘来提升数据读写速度、增加存储容量或提供数据冗余以确保数据安全。然而,用户在使用SAS或SATA RAID阵列卡组建RAID后,可能会遇到在安装操作系统过程中硬盘无法被系统识别的问题。接…

【会议征稿,IEEE出版】第九届信息科学、计算机技术与交通运输国际学术会议(ISCTT 2024,6月28-30)

第九届信息科学、计算机技术与交通运输国际学术会议&#xff08;ISCTT 2024&#xff09;将于2024年6月28-30日在中国绵阳举行。 ISCTT 2024将围绕 “信息科学”、"计算机技术”、“交通运输” 等最新研究领域&#xff0c;为来自国内外高等院校、科学研究所、企事业单位的专…

安卓 view淡入淡出(fade in fade out) kotlin

文章目录 前言一、布局文件二、kotlin扩展方法1.fadeOutAnimation 淡出动画2.fadeInAnimation 淡入动画 三、使用总结 前言 好久没写文章了,简单码一个淡入淡出,我们先上效果图 那么接下来上代码 一、布局文件 我这边直接将activity_main.xml改为下列代码,可以看到其中包含一…

【Daily Code】leetcode2951. 找出峰值

Problem: 2951. 找出峰值 Code class Solution { public:vector<int> findPeaks(vector<int>& mountain) {int n mountain.size();vector<int> res;for(int i 1; i < n - 1; i ) {if(mountain[i] > mountain[i - 1] && mountain[i] >…

【并发程序设计】11.进程间通信

11.进程间通信 &#xff08;IPC&#xff0c;InterProcess Communication&#xff09;进程和进程之间交换信息。 常用通信方式 无名管道&#xff08;pipe&#xff09;有名管道 &#xff08;fifo&#xff09;信号&#xff08;signal&#xff09;共享内存(mmap)套接字&#xff0…

jenkins+sonarqube部署与配置过程

1、部署jenkins&#xff08;本文不做说明&#xff09; 2、部署sonarqube(docker-compose) version: "2.1"services:sonarqube:image: sonarqube:9.9.4-communitycontainer_name: sonarqubedepends_on:- dbports:- 9000:9000networks:- sonarnetenvironment:SONARQU…

大模型-大模型评测

1、参考文章&#xff1a;https://www.linkresearcher.com/information/f4a3b0e0-9d14-45cc-9f8a-acac0ce6addd 2、总结&#xff1a; 语义评测&#xff1a;评测大模型是否能正确理解语言的含义代码评测&#xff1a;评测大模型是否能给出能够执行出正确结果的代码对齐评测&#…

C++候捷stl-视频笔记1

认识headers、版本、重要资源 STL的核心思想是泛型编程 新式头文件内的组件封装在命名空间std中&#xff1a; using namespace std; using std::cout;或std::vector vec; 旧式头文件内的组件不封装在命名空间std中 注:不建直接使用using namespace xxx&#xff0c;如果使用的…

Meterpreter工具使用

Meterpreter属于stage payload&#xff0c;在Metasploit Framework中&#xff0c;Meterpreter是一种后渗透工具&#xff0c;它 属于一种在运行过程中可通过网络进行功能扩展的动态可扩展型Payload。这种工具是基于“内存DLL注 入”理念实现的&#xff0c;它能够通过创建一个新进…

SAP_MM_业务数据

在SAP的物料管理模块&#xff08;MM&#xff0c;Materials Management&#xff09;中&#xff0c;业务数据&#xff08;Transactional Data&#xff09;是日常业务操作所产生的动态数据。这些数据记录了与采购、库存和物料需求计划&#xff08;MRP&#xff09;相关的实际业务活…

微乐校园管理系统的设计

管理员账户功能包括&#xff1a;系统首页&#xff0c;个人中心&#xff0c;管理员管理&#xff0c;基础数据管理&#xff0c;叫车管理&#xff0c;代跑管理&#xff0c;二手商品管理 司机账户功能包括&#xff1a;系统首页&#xff0c;个人中心&#xff0c;叫车管理&#xff0c…