当前位置:
文档之家› Oracle 性能调整内存篇PPT课件
Oracle 性能调整内存篇PPT课件
estd_physical_read_factor, estd_physical_reads FROM V$DB_CACHE_ADVICE WHERE name = 'DEFAULT' AND block_size =
(SELECT value FROM V$PARAMETER WHERE name = 'db_block_size') AND advice_status = 'ON';
➢ 系统全局区
数据缓冲区 共享池 日志缓冲区
➢ 程序全局区
PGA UGA
内存优化
内存最基本的优化方法
➢ 增加内存的大小
增加内存是最简单的优化方法 增加内存不是万金油 增加内存到足够大,内存对性能的增益不是线性递增的
➢ 内存增加到多大合适?
增加到性能增益曲线的拐点或者平滑点 平衡性能和资源的需求 两种方法判断内存大小:
12582912 .5 631649280 3530752 99
3
18874368 .75 631649280
0
100
2
25165824
1 631649280
Oracle 性能调整
Oracle内存优化
Server process
PGA
Shared Pool
Library Cache
Data Dictionary Cache
SGA
Database Buffer Cache
Redo Log Buffer
Stream pool
Large Pool
Java Pool
1Hale Waihona Puke 397263961.2
20
4389 5961
1 397263
104
1.3
20
4389 5961
1 397263
112
1.4
20
4389 5961
1 397263
120
1.5
20
4389 5961
1 397263
128
1.6
20
4389 5961
1 397263
……
PGA的内存调整建议
Select from
pga size pga factor bytes proc estd byte RW setd pga hit estd overalloc cnt
---------- ---------- ---------- ------------ ------------ ------------------
• 尝试不断的增大 • 使用9i的内存大小建议
数据高速缓存区的大小建议
➢ 数据缓存区的参考特性可以启用或者禁用统计信息的 收集,以预测不同缓存大小时数据库的性能.
➢ 这些统计提供的信息可以帮助DBA根据系统的负载量 定义合适的数据缓存区大小.
➢ 数据缓存区的参考通过DB_CACHE_ADVICE参数启用.
5
数据高速缓存区大小的建议值
➢ 数据缓存区的参考值被收集到 V$DB_CACHE_ADVICE视图.
➢ 这是视图包含了预测的在不同缓存大小的情况下,估 计的物理读次数.
➢ 行里也计算了物理读因子(physical read factor),这 个值来源于实际的缓存区在周期测量期间估计的读 数与实际的读数之比.
40
.5
20
4389 5961
1 397263
48
.6
20
4389 5961
1 397263
56
.7
20
4389 5961
1 397263
64
.8
20
4389 5961
1 397263
72
.9
20
4389 5961
1 397263
80
1
20
4389 5961
1 397263
88
1.1
20
4389 5961
共享池的内存调整建议
Select from
SHARED_POOL_SIZE_FOR_ESTIMATE "pool size", SHARED_POOL_SIZE_FACTOR "pool size factor", ESTD_LC_SIZE "estd lc size", ESTD_LC_MEMORY_OBJECTS "estd lc mem obj", ESTD_LC_TIME_SAVED "time saved", ESTD_LC_TIME_SAVED_FACTOR "time saved factor", ESTD_LC_MEMORY_OBJECT_HITS "mem obj hits" v$shared_pool_advice;
6
数据高速缓存区的内存调整建议
长期稳定运行状态下(db_cache_advice=ON)
column size_for_estimate format 999,999,999,999 heading 'Cache Size (m)' column buffers_for_estimate format 999,999,999 heading 'Buffers' column estd_physical_read_factor format 999.90 heading 'Estd Phys|Read Fact' column estd_physical_reads format 999,999,999 heading 'Estd Phys| Reads' SELECT size_for_estimate, buffers_for_estimate,
PGA_TARGET_FOR_ESTIMATE "pga size", PGA_TARGET_FACTOR "pga factor",BYTES_PROCESSED "bytes proc", ESTD_EXTRA_BYTES_RW "estd byte RW", ESTD_PGA_CACHE_HIT_PERCENTAGE "setd pga hit", ESTD_OVERALLOC_COUNT "estd overalloc cnt" v$pga_target_advice;
pool size pool size factor estd lc size estd lc mem obj time saved time saved factor mem obj hits
---------- ---------------- ------------ --------------- ---------- ----------------- ------------