alter system set "_PX_use_large_pool" = true scope=spfile;
alter system set "_clusterwide_global_transactions" = false scope=spfile;
alter system set "_gc_defer_time" = 3 scope=spfile;
alter system set "_resource_manager_always_off" = true scope=spfile;
alter system set "_resource_manager_always_on" = false scope=spfile;
alter system set "_serial_direct_read" = never scope=spfile;
alter system set "_cleanup_rollback_entries" = 400 scope=spfile;
alter system set "_optimizer_use_feedback" = false scope=spfile;
alter system set "_dbms_sql_security_level" =0 scope=spfile;
alter system set "_bloom_pruning_enabled" = false scope=spfile;
alter system set "_gc_policy_time" = 0 scope=spfile;
alter system set "_bloom_filter_enabled" = false scope=spfile;
alter system set "_gc_read_mostly_locking" = false scope=spfile;
alter system set "_gc_undo_affinity" = false scope=spfile;
alter system set "_smu_debug_mode" = 134217728 scope=spfile;
alter system set "_undo_autotune" = false scope=spfile;
alter system set deferred_segment_creation = false scope=spfile;
alter system set Audit_trail = none scope=spfile;
alter system set event='28401 trace name context forever,level 1' scope=spfile;
alter system set "_optimizer_extended_cursor_sharing_rel"=none;
alter system set "_optimizer_extended_cursor_sharing"=none;
alter system set "_optimizer_adaptive_cursor_sharing"=false;
参数释义:
一、_PX_use_large_pool
并行执行从属进程一起工作时会交换数据和信息,所以我们需要从shared pool或large pool中分配内存,
这个取决于PARALLEL_AUTOMATIC_TUNING参数值的设置,_PX_use_large_pool所起的作用跟PARALLEL_AUTOMATIC_TUNING参数差不多。
当PARALLEL_AUTOMATIC_TUNING=TRUE时从large pool中分配内存,否则从shared pool分配。
10g中,PX信息缓存在large pool中分配,如果:
a.) parallel_automatic_tuning = true (弃用)
or
b.) _PX_use_large_pool = true
or
c.) sga_target is set
11g中,PX信息缓存在large pool中分配,如果:
a.) parallel_automatic_tuning = true (弃用)
or
b.) _PX_use_large_pool = true
or
c.) SGA memory is auto tuned (sga_target or memory_target)
二、_clusterwide_global_transactions
集群范围全局性事务(Clusterwide global transactions)是11g的新特性,其容许XA事务(XA分布式事务)在RAC中更透明。基本上,
一个集群范围全局性事务是一个在RAC中的每个节点均有一个本地事务的分布式事务,当_clusterwide_global_transactions=true(默认)时,
ORACLE会把这些本地事务当做一个事务对待,当_clusterwide_global_transactions=false时,ORACLE会将这些本地事务当做单独的事务
通过多阶段提交协调处理。设置该参数为false不会有任何性能影响。
设置该参数值为FALSE可以解决如下等问题:
Bug 13605839 ORA-600 [ktbsdp1] ORA-600 [kghfrempty:ds] ORA-600 [kdBlkCheckError]. Corruption in Rollback with Clusterwide Global Transactions in RAC
ORA-00600: [kjuscl:!free]
三、_gc_defer_time
how long to defer pings for hot buffers in milliseconds
用于确定服务器在将频繁使用的块写入磁盘之前要等待的时间长度 (以 1/1000 秒为单位),以减少进程对热块的争用,默认为0。
四、_resource_manager_always_off、_resource_manager_always_on
默认FALSE、TRUE,其默认是启用资源调度。
将_resource_manager_always_off = true、_resource_manager_always_on = false即为禁用Oracle缺省启用的资源调度,
避免可能产生resmgr:cpu quantum等待事件情况。由于在11g中资源调度存在诸多BUG,故选择关闭。
部分官档:
'resmgr:cpu quantum' wait event in 11g when VKRM process is not present (文档 ID 1603996.1)
Awr Reports hang, MMon slaves are waiting on resmgr:cpu quantum (文档 ID 1530676.1)
例如:
(1)当undo自动管理分配undo时,某些情况下有些undo段很很忙,有些则比较空闲,这个时候我们需将事务使用的回滚段从忙的回滚段
修改成闲的回滚段。
select segment_name,owner,tablespace_name from DBA_ROLLBACK_SEGS; <<==查询回滚段
set transaction use rollback segment "_SYSSMU8_517538920$"; <<==执行回滚段
select XIDUSN from V$TRANSACTION; <<==查询事务回滚段
3)当一个大事务被kill后,SMON进行事务回滚时会被MMON进程堵塞
select usn, state, undoblockstotal "Total", undoblocksdone "Done", undoblockstotal-undoblocksdone "ToDo",
decode(cputime,0,'unknown',sysdate+(((undoblockstotal-undoblocksdone) / (undoblocksdone / cputime)) / 86400)) "Estimated time to complete"
from v$fast_start_transactions;
USN STATE Total Done ToDo Estimated time to complete
---------- ---------------- ---------- ---------- ---------- -----------------------------
90 RECOVERED 15669 15669 0 01-OCT-2012 05:52:35
15 RECOVERING 174954 8137 166817 17-OCT-2012 12:32:07 <<<<<<<<<<
GNTOUN35>/
USN STATE Total Done ToDo Estimated time to complete
---------- ---------------- ---------- ---------- ---------- -----------------------------
90 RECOVERED 15669 15669 0 01-OCT-2012 05:52:39
15 RECOVERING 174954 8137 166817 17-OCT-2012 12:33:33 <<<<<<<<<<<<<<<
GNTOUN35>/
USN STATE Total Done ToDo Estimated time to complete
---------- ---------------- ---------- ---------- ---------- -----------------------------
90 RECOVERED 15669 15669 0 01-OCT-2012 05:52:40
15 RECOVERING 174954 8137 166817 17-OCT-2012 12:33:54 <<<<< see no movement for this
解决方法:
设置参数
alter system set "_smu_debug_mode"=134217728;
kill MMON进程(注:kill MMOM进程不会终止实例,AWR主要的进程,kill之后一个新的MMON进程会自动使用_smu_debug_mode=134217728启动)
kill -9
官档:
Minact-Scn Master-Status: Grec-Scn Messages In Trace File (文档 ID 1361567.1)
SMON Is Waiting On Latch High CPU Resource consumption MMON blocking SMON (文档 ID 1496453.1)
十七、_optimizer_extended_cursor_sharing_rel、_optimizer_extended_cursor_sharing、_optimizer_adaptive_cursor_sharing
自适应游标共享(Adaptive Cursor Sharing: ACS)
alter system set "_optimizer_extended_cursor_sharing_rel"=none;
alter system set "_optimizer_extended_cursor_sharing"=none;
alter system set "_optimizer_adaptive_cursor_sharing"=false;
即为关闭ACS,避免众多Bug,例如Bug 11657468,Bug 12333007等。
官档:
Bug 11657468 - Excessive mutex waits with adaptive cursor sharing (文档 ID 11657468.8)
Bug 12333007 - Dump on kkocscopycolstats (文档 ID 12333007.8)