Oracle RAC 碰到 gc buffer busy

简介:

今天做awr报告发现gc buffer busy等待时间

gc buffer busy
  This wait event, also known as global cache buffer busy prior to Oracle 10g, specifies the time the remote instance locally spends accessing the requested data block. This wait event is very similar to the buffer busy waits wait event in asingle-instance database and are often the result of:

1. Hot Blocks - multiple sessions may be requesting a block that is either not in buffer cache or is in an incompatible mode. Deleting some of the hot rows and re-inserting them back into the table may alleviate the problem. Most of the time the rows will be placed into a different block and reduce contention on the block. The DBA may also need to adjust the pctfree and/or pctused parameters for the table to ensure the rows are placed into a different block.

2. Inefficient Queries ˆ as with the gc cr request wait event, the more blocks requested from the buffer cache the more likelihood of a session having to wait for other sessions.Tuning queries to access fewer blocks will often result in less contention for the same block.

第一点应该基本排除:我刚刚整理完表,我们首先找到造成次问题的sql
1、首先查看上次所有的等待事件种类

  1. SQL> select min(begin_interval_time) minmax(end_interval_time) max from dba_hist_snapshot where snap_id between 204 and 228;  
  2. SQL> select wait_class_id, wait_class, count(*) cnt  
  3. from dba_hist_active_sess_history  
  4. where snap_id between 204 and 228  
  5. group by wait_class_id, wait_class  
  6. order by 3;  
  7. 结果如下:  
  8. WAIT_CLASS_ID WAIT_CLASS                            CNT  
  9. ------------- ------------------------------ ----------   
  10.    4217450380 Application                             1  
  11.    1740759767 User I/O                                3  
  12.    2000153315 Network                                 7  
  13.    3875070507 Concurrency                             8  
  14.    3386400367 Commit                                 24  
  15.    4108307767 System I/O                             54  
  16.    1893977003 Other                                  66  
  17.    3871361733 Cluster                               104  
  18.                                                    3543  
 

2、查看上次所有的等待事件

  1. SQL> SELECT event_id, event, COUNT (*) cnt  
  2.     FROM dba_hist_active_sess_history  
  3.    WHERE snap_id BETWEEN 204 AND 228 AND wait_class_id = 3871361733  
  4. GROUP BY event_id, event  
  5. ORDER BY 3;  
  6. 结果如下:                                             
  7.   EVENT_ID EVENT                                 CNT  
  8. ---------- ------------------------------ ----------   
  9. 2277737081 gc current grant busy                   1  
  10.  512320954 gc cr request                           1  
  11. 3897775868 gc current multi block request          4  
  12.  737661873 gc cr block 2-way                       5  
  13.  111015833 gc current block 2-way                  6  
  14. 2701629120 gc current block busy                   7  
  15. 1520064534 gc cr block busy                        9  
  16. 1478861578 gc buffer busy                         71  

3、查询造成等待事件的sql

  1. SQL> SELECT sql_id, COUNT (*) cnt  
  2.     FROM dba_hist_active_sess_history  
  3.    WHERE snap_id BETWEEN 204 AND 228 AND event_id IN (1520064534, 1478861578)  
  4. GROUP BY sql_id  
  5.   HAVING COUNT (*) > 1  
  6. ORDER BY 2;  
  7. 结果如下:  
  8. SQL_ID               CNT  
  9. ------------- ----------   
  10. fuzy096ka7sca          2  
  11. 9mdnmqu9vhht6          4  
  12. btb1g900q18u3          5  
  13. 1y4rsrmg1m8u9          5  
  14. g42h7cxm2jsmb          8  
  15. 8knuwvx47gdsz         16  
  16. bp92nqubvbpdq         40  

4、查询具体的sql

  1. SELECT *  
  2.   FROM dba_hist_sqltext d  
  3.  WHERE sql_id IN  
  4.           ('bp92nqubvbpdq',  
  5.            '8knuwvx47gdsz',  
  6.            'g42h7cxm2jsmb',  
  7.            '1y4rsrmg1m8u9',  
  8.            'btb1g900q18u3',  
  9.            '9mdnmqu9vhht6',  
  10.            'fuzy096ka7sca');  

最后看到,主要是因为一个插入的sql产生的原因,下面就是和开发商量怎么解决这个问题了。

分类:  OralceRac

本文转自einyboy博客园博客,原文链接:http://www.cnblogs.com/einyboy/archive/2012/07/12/2588373.html
目录
相关文章
|
26天前
|
运维 Oracle 前端开发
Oracle 11g RAC集群日常运维命令总结
Oracle 11g RAC集群日常运维命令总结
50 2
|
1月前
|
Oracle 关系型数据库
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
|
2月前
|
存储 负载均衡 Oracle
|
2月前
|
存储 Oracle 关系型数据库
|
4月前
|
存储 Oracle 关系型数据库
Oracle RAC:数据库集群的舞动乐章
【4月更文挑战第19天】Oracle RAC是Oracle提供的高可用性数据库解决方案,允许多个实例共享同一数据库,确保业务连续性和数据完整性。通过集群件和全局缓存服务实现服务器间的协调和通信。RAC提供高可用性,通过故障转移应对故障,同时提升性能,多个实例并行处理请求。作为数据管理员,理解RAC的架构和管理至关重要,以发挥其在数据管理中的最大价值。
|
4月前
|
存储 运维 Oracle
Oracle系列十八:Oracle RAC
Oracle系列十八:Oracle RAC
|
1月前
|
存储 自然语言处理 Oracle
Oracle数据库字符集概述及修改方式
【8月更文挑战第15天】Oracle 数据库字符集定义了数据的编码方案,决定可存储的字符类型及其表示方式。主要作用包括数据存储、检索及跨系统传输时的正确表示。常见字符集如 AL32UTF8 支持多语言,而 WE8MSWIN1252 主用于西欧语言。修改字符集风险高,可能导致数据问题,需事先备份并评估兼容性。可通过 ALTER DATABASE 语句直接修改或采用导出-导入数据的方式进行。完成后应验证数据完整性。此操作复杂,须谨慎处理。
|
1月前
|
数据采集 Oracle 关系型数据库
实时计算 Flink版产品使用问题之怎么实现从Oracle数据库读取多个表并将数据写入到Iceberg表
实时计算Flink版作为一种强大的流处理和批处理统一的计算框架,广泛应用于各种需要实时数据处理和分析的场景。实时计算Flink版通常结合SQL接口、DataStream API、以及与上下游数据源和存储系统的丰富连接器,提供了一套全面的解决方案,以应对各种实时计算需求。其低延迟、高吞吐、容错性强的特点,使其成为众多企业和组织实时数据处理首选的技术平台。以下是实时计算Flink版的一些典型使用合集。
|
1天前
|
Oracle 关系型数据库 数据库
数据库数据恢复—Oracle数据库文件出现坏块的数据恢复案例
打开oracle数据库报错“system01.dbf需要更多的恢复来保持一致性,数据库无法打开”。 数据库没有备份,无法通过备份去恢复数据库。用户方联系北亚企安数据恢复中心并提供Oracle_Home目录中的所有文件,急需恢复zxfg用户下的数据。 出现“system01.dbf需要更多的恢复来保持一致性”这个报错的原因可能是控制文件损坏、数据文件损坏,数据文件与控制文件的SCN不一致等。数据库恢复工程师对数据库文件进一步检测、分析后,发现sysaux01.dbf文件损坏,有坏块。 修复并启动数据库后仍然有许多查询报错,export和data pump工具使用报错。从数据库层面无法修复数据库。
数据库数据恢复—Oracle数据库文件出现坏块的数据恢复案例

推荐镜像

更多