日期:2014-05-16  浏览次数:20746 次

Oracle 性能调优学习笔记(七)-- 其他SGA结构的调整

监控redolog buffer
????? oracle 的sp从用户内存拷贝到redo log buffer中.
????? LGWR在一下情形将redo log buffer数据写到文件.
????? 1.每三秒
????? 2.用户提交数据.
????? 3.redo log buffer使用1/3
????? 4.redo log超过1MB的时候.
????? 5.DBWn进程写脏数据写到磁盘,对应磁盘的redo log前写到磁盘.
??? redo log buffer的调整
????? LOG_BUFFER
????? 默认为(512K or 128K )* CPU_COUNT.
????? select * from v$sgastat;
????? show parameter log_buffer;
??? 避免redolog? buffer 不足问题.
???? 1. log buffer space 等待 v$session_wait Log Buffer Space Event
????? select sid,event,seconds_in_wait,state
??????? from v$session_wait
????????? where event = 'log buffer space'
???? 2.v$sysstat? redo entries,redo buffer allocation retries
???????? select name ,value from v$sysstat
???????? where name in ('redo buffer allocation retries','redo entries');
????? redo buffer allocation retries/redo entries 的比例尽可能的小.
????
???? redo log 磁盘IO信息
???? 查看redo log日志切换的等待时间
???? select event,total_waits,tiime_waited ,average_wait
???????? from v$system_event
????? where event like 'log file switch completion';
????
????DBWn没有完全完成检查信息当LGWR需要写文件的时候.此时
????Alert log文件显示信息"Checkpoint not complete".
????select event,total_waits,time_waited,average_wait
?????? from v$system_event
?????? where event like 'log file switch check%';
????? 设置FAST_START_MTTR_TARGET的值决定checkpoint事件频率.
????? 检查redo log组的大小和数量.
????? ARCn写文件很忙的时候,LGWR可以增加ARCn的进程数量(LOG_ARCHIVE_MAX_PROCESS的值).
????? 检查归档日志文件目录大小.
????? 添加redo log group.
?????
???监控Java Pool
???限制Java会话内存使用:
???? JAVA_SOFT_SESSIONSPACE_LIMIT:
???? JAVA_MAX_SESSIONSPACE_SIZE:
???? select * from v$sgastat where pool='java pool';
??
?? SHARED_POOL_SIZE:
???????????? 每一个java class使用内存 8kb.
???????????? 加载大的JAR文件Java POOL为50MB.
???????? ?Java_POOL_SIZE
???????????????? 默认大小24MB