Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2248588
  • 博文数量: 310
  • 博客积分: 6853
  • 博客等级: 准将
  • 技术积分: 2833
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-04 16:41
文章分类

全部博文(310)

文章存档

2013年(17)

2012年(42)

2011年(76)

2010年(71)

2009年(99)

2007年(2)

2006年(1)

2005年(2)

分类: Oracle

2009-07-27 16:27:10

自动管理方式:

调整两个参数:SGA_TARGET and PGA_AGGREGATE_TARGET initialization parameters.

  • 自动管理共享区
做如下设置:
1、set the SGA_TARGET initialization parameter to a nonzero value 
2、set the STATISTICS_LEVEL initialization parameter to TYPICAL or ALL.
3、应设置 SGA_MAX_SIZE ,在日后扩大内存时比较方便。 


内存与操作系统的关系,为了避免页交换 
应设置 LOCK_SGA

自动管理如下区:
 Database buffer cache (default pool)
 Shared pool
 Large pool
 Java pool

自动管理与手工管理的关系:如果手工设置了上面的值(即这些值非零),则这些值作为自动管理中的最小值,仍处在自动管理中。

SGA_TARGET 是个动态参数,可以在运行时进行调整,但不超过 SGA_MAX_SIZE

手动管理,不受自动管理影响的部分:
 Log buffer
 Other buffer caches, such as KEEP, RECYCLE, and other block sizes
 Streams pool
 Fixed SGA and other internal allocations

这些区域所占用的大小会从总SGA中进行扣除。

操作语句:
example:ALTER SYSTEM SET  SGA_TARGET  =10g SCOPE=SPFILE; 

相关参数:
Automatically Sized SGA Components and Corresponding Parameters 
SGA Component Initialization 
The shared pool SHARED_POOL_SIZE
The large pool LARGE_POOL_SIZE
The Java pool JAVA_POOL_SIZE
The buffer cache DB_CACHE_SIZE
The Streams pool STREAMS_POOL_SIZE

影响范围:下次重启之后生效。 SCOPE=SPFILE  可选列表为:SPFILE,MEMORY,BOTH 
参数值的粒度大小:
在小于1G时为4M;大于1G为16M

  • 为什么要使用内存:
physical I/0慢的主要原因:
1、Disk access (physical I/O) take a significant amount of time,
compared with memory access, typically in the order of 10 milliseconds
2、Physical I/O also increases the CPU resources required,
  2a、because of the path length in device drivers
  2b、and operating system event schedulers.

  • 监控SGA自动调整的相关视图:

 V$SGA_CURRENT_RESIZE_OPS: Information about SGA resize operations that
are currently in progress. An operation can be a grow or a shrink of a dynamic
SGA component.
 V$SGA_RESIZE_OPS: Information about the last 400 completed SGA resize
operations. This does not include any operations currently in progress.
 V$SGA_DYNAMIC_COMPONENTS: Information about the dynamic components
in SGA. This view summarizes information based on all completed SGA resize
operations since startup.
 V$SGA_DYNAMIC_FREE_MEMORY: Information about the amount of SGA
memory available for future dynamic SGA resize operations.


阅读(4534) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~