Oracle11g RAC下真的要关闭DRM
来源:互联网 发布:linux集群搭建报告 编辑:程序博客网 时间:2024/04/30 02:22
以前从来没有遇到过如此的问题,特别是gcs drm freeze in enter server mode等待事件,是DRM特性。在影响用户的角度分析,执行频繁的insert语句很慢,我想原因与两个,一是插入的时候需要读取待插入数据块,二是需要读取待插入的索引块,还有索引的分裂。数据块在节点之间来回传输导致等待。
Top 10 Foreground Events by Total Wait Time
71.6K
10.5
gc cr block congested30,06557K18978.4Clustergcs drm freeze in enter server mode101,84550.3K4937.4Otherenq: TX - row lock contention9,53849.4K51797.2Applicationgc current block congested40,35443.9K10876.4Clustergc current grant busy958,40635.8K375.3Clustergc cr block 2-way531,32026.1K493.8Clustergc current block 2-way864,94812.4K141.8Clustergc buffer busy release24,04211.8K4911.7Cluster
由于需要等几天才能重启数据库,所以临时的处理方案是将weblogic指向一个实例,从效果上来看,非常不错。
在10g中,可以采用如下方式禁用DRM(当然你也可以只禁用其中的一个模块object affinity或者undo affinity)
--disable object affinity
alter system set "_gc_affinity_time"=0 scope=spfile ;
--disable undo affinity
alter system set "_gc_undo_affinity"=FALSE scope=spfile;
然后同时重启所有实例生效。
如果暂时无法重启实例,可以使用如下命令“事实上”禁用DRM:(以下两个参数可以动态调整)
alter system set “_gc_affinity_limit”=10000000 sid='*';
alter system set “_gc_affinity_minimum”=10000000 sid='*';
在11g中,同样可以使用如下方式禁用DRM,强烈建议关闭:
alter system set "_gc_policy_time"=0 scope=spfile;
然后同时重启所有实例生效。如果不想完全禁用DRM,但是需要禁用read-mostly locking或者reader bypass的机制。可以使用如下命令:
--disable read-mostly locking
alter system set "_gc_read_mostly_locking"=false scope=spfile sid='*';
--disable reader-bypass
alter system set "_gc_bypass_readers"=false scope=spfile sid='*';
关闭DRM之后的数据库报告的情况:
Top 10 Foreground Events by Total Wait Time
21.1K
79.0
db file sequential read201,4291541.285.8User I/Odb file scattered read121,8671017.883.8User I/Odirect path read temp175,993494.231.9User I/OSQL*Net message from dblink69,387458.171.7Networkenq: TX - row lock contention108389.136021.5Applicationlog file sync112,847356.231.3Commitread by other session40,569222.25.8User I/Odb file parallel read11,173157.714.6User I/Ogc current block busy25,6591556.6Cluster
本次出问题的数据库SGA设置为1T,所以安装的时候需要初始化一些特殊的参数。
Best Practices and Recommendations for RAC databases with SGA size over 100GB (文档 ID 1619155.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.3 and laterInformation in this document applies to any platform.
PURPOSE
The goal of this note is to provide best practices and recommendations to users of Oracle Real Application Clusters (RAC) databases using very large SGA (e.g. 100GB) per instance (note that RAC assumes homogeneously sized SGAs across the cluster). This document is compiled and maintained based on Oracle's experience with its global RAC customer base.
This is not meant to replace or supplant the Oracle Documentation set, but rather, it is meant as a supplement to the same. It is imperative that the Oracle Documentation be read, understood, and referenced to provide answers to any questions that may not be clearly addressed by this note.
All recommendations should be carefully reviewed by your own operations group and should only be implemented if the potential gain as measured against the associated risk warrants implementation. Risk assessments can only be made with a detailed knowledge of the system, application, and business environment.
SCOPE
This article applies to all new and existing RAC implementations.
This is for RAC databases only as most of the parameters listed in here are for RAC Database only.
DETAILS
Note that the recommendations presented in this note are a result of the experience from working on databases with SGA of 1 TB and 2.6 TB.
Also, the databases with SGA of 100GB and 300GB also benefited from the recommendations
init.ora parameters:
Setting this will prevent some timeouts during reconfiguration and DRM. It's a static parameter and rolling restart is supported.
b. Set _ksmg_granule_size to 134217728
Setting this will cut down the time needed to locate the resource for a data block. It's a static parameter and rolling restart is supported.
c. Set shared_pool_size to 15% or larger of the total SGA size.
For example, if SGA size is 1 TB, the shared pool size should be at least 150 GB. It's a dynamic parameter.
d. Set _gc_policy_minimum to 15000
There is no need to set _gc_policy_minimum if DRM is disabled by setting _gc_policy_time = 0. _gc_policy_minimum is a dynamic parameter, _gc_policy_time is a static parameter and rolling restart is not supported. To disable DRM, instead of _gc_policy_time, _lm_drm_disable should be used as it's dynamic.
e. Set _lm_tickets to 5000
Default is 1000. Allocating more tickets (used for sending messages) avoids issues where we ran out of tickets during the reconfiguration. It's a static parameter and rolling restart is supported. When increasing the parameter, rolling restart is fine but a cold restart can be necessary when decreasing.
f. Set gcs_server_processes to the twice the default number of lms processes that are allocated.
The default number of lms processes depends on the number of CPUs/cores that the server has,
so please refer to the gcs_server_processes init.ora parameter section in the Oracle Database Reference Guide
for the default number of lms processes for your server. Please make sure that the total number of lms processes
of all databases on the server is less than the total number of CPUs/cores on the server. Please refer to the Document 558185.1
It's a static parameter and rolling restart is supported.
- Oracle11g RAC下真的要关闭DRM
- ORACLE11G RAC启动关闭步骤
- ORACLE11G RAC启动关闭步骤
- Oracle11g RAC集群启动关闭
- rac drm
- Oracle 10g RAC中的DRM问题及关闭
- Oracle 10g RAC中的DRM问题及关闭
- Oracle 10g RAC中的DRM问题及关闭
- Oracle 10g RAC中的DRM问题及关闭
- linux下Oracle11g RAC搭建
- Linux下搭建Oracle11g RAC
- Oracle11g RAC开启关闭、设置归档
- Oracle11g RAC开启关闭、设置归档
- Oracle11g RAC集群启动关闭管理
- 转 Oracle11g RAC下ASM 的管理与维护
- DRM引起的问题解决一例(关闭DRM)
- oracle RAC DRM基本概念
- RAC DRM 原理
- 各种接口
- ios10 xcode8 Missing file
- WEB技术的桌面化和JavaScript的全栈化
- 更新xcode8后取消log多余打印
- 软件测试分类
- Oracle11g RAC下真的要关闭DRM
- 安卓gson-fomat 插件 根据json自动生成实体类
- 企业上架发布-工作中遇到的一点问题
- 安卓 RecyclerView
- 第四天2017/03/31(下午1:结构体、数组)
- Ubuntu 配置jdk
- MySQL5.6在线DDL需要注意的问题
- Ubuntu 开启桌面小图标
- 图片网址