ITPub博客

首页 > 应用开发 > IT综合 > The SGA_MAX_SIZE Initialization Parameter (72)

The SGA_MAX_SIZE Initialization Parameter (72)

原创 IT综合 作者:tsinglee 时间:2007-10-23 10:33:51 0 删除 编辑

The SGA comprises a number of memory components, which are pools of memory
used to satisfy a particular class of memory allocation requests. Examples of memory
components include the shared pool (used to allocate memory for SQL and PL/SQL
execution), the java pool (used for java objects and other java execution memory), and
the buffer cache (used for caching disk blocks). All SGA components allocate and
deallocate space in units of granules. Oracle Database tracks SGA memory use in
internal numbers of granules for each SGA component.
Granule size is determined by total SGA size. On most platforms, the size of a granule
is 4 MB if the total SGA size is less than 1 GB, and granule size is 16MB for larger
SGAs. Some platform dependencies arise. For example, on 32-bit Windows, the
granule size is 8M for SGAs larger than 1 GB.
Oracle Database can set limits on how much virtual memory the database uses for the
SGA. It can start instances with minimal memory and allow the instance to use more
memory by expanding the memory allocated for SGA components, up to a maximum
determined by the SGA_MAX_SIZE initialization parameter. If the value for SGA_MAX_
SIZE in the initialization parameter file or server parameter file (SPFILE) is less than
the sum the memory allocated for all components, either explicitly in the parameter
file or by default, at the time the instance is initialized, then the database ignores the
setting for SGA_MAX_SIZE.
For optimal performance in most systems, the entire SGA should fit in real memory. If
it does not, and if virtual memory is used to store parts of it, then overall database
system performance can decrease dramatically. The reason for this is that portions of
the SGA are paged (written to and read from disk) by the operating system. The
amount of memory dedicated to all shared areas in the SGA also has performance impact.
The size of the SGA is determined by several initialization parameters. The following
parameters have the greatest effect on SGA size:
DB_CACHE_SIZE :The size of the cache of standard blocks.
LOG_BUFFER :The number of bytes allocated for the redo log buffer.
SHARED_POOL_SIZE :The size in bytes of the area devoted to shared SQL and
PL/SQL statements.
LARGE_POOL_SIZE :The size of the large pool; the default is 0.
JAVA_POOL_SIZE :The size of the Java pool.

1. 所有的sga组件都是以细粒度来作为单位分配和回收的 。
2. 细粒度的大小是有总的sga大小决定的 , 在大多数平台下 ,如果sga小于1G , 则细粒度大小为4M ,
对于更大的sga , 细粒度大小为16M , 有些平台是有依赖关系的 ,在32位windows平台下 , 如果
sga大于1G , 细粒度大小为8M.
3. Oracle数据库可设置使用的虚拟内存的限制 , 在实例启动时 , 使用最小的内存 , 并且允许实例
为sga组件分配更多的内存直到达到SGA_MAX_SIZE参数设置的值 .
理想的情况是 , sga应该适合实存 , 否则会发生页交换影响性能 。
4. 对sga有很大影响的参数
DB_CACHE_SIZE : 标准块的高速缓存大小
LOG_BUFFER : 重做日志缓存大小

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-978123/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 昨晚下雪了
请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1892950