Chinaunix首页 | 论坛 | 博客
  • 博客访问: 580884
  • 博文数量: 80
  • 博客积分: 2393
  • 博客等级: 大尉
  • 技术积分: 1434
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-03 21:46
个人简介

己所不欲勿施于人!

文章分类

全部博文(80)

文章存档

2017年(1)

2016年(9)

2014年(1)

2013年(17)

2012年(5)

2011年(13)

2010年(9)

2009年(8)

2008年(17)

分类: Oracle

2013-05-02 12:23:08



对于Oracle内存体系结果,有太多的资料,这里只是在OCP考试过程中问到具体的问题,有些模糊,在此整理一下。

SGA contains data structures:

Buffer_name
Buffer_used
Database buffer cache.
used for caching disk blocks
Redo log buffer
The redo log buffer is a circular buffer in the SGA that holds information about
changes made to the database
Shared Pool
used to allocate memory for SQL and PL/SQL execution
Java Pool
used for java objects and other java execution memory
Large Pool
used for RMAN
Streams Pool
used for Oracle Stream
fixed SGA.
Part of the SGA contains general information about the state of the database and the
instance, which the background processes need to access; 
this is called the fixed SGA.

All SGA components allocate and deallocate space in units of granules
所有的SGA组件申请或者释放内存都是以粒度为单位。

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.
粒度的大小取决于SGA。在大多数的平台上,当SGA小于1G时,粒度为4M.大于1G时为16M.

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.
SGA_MAX_SIZE限制Oracle分配给SGA内存的大小。
如果SGA_MAX_SIZE的数值,小于在参数文件或者Spfile中设置各组件大小之和,则会忽略SGA_MAX_SIZE的限制。

an instance using the SGA_TARGET initialization
parameter and the Oracle Database will automatically distribute this memory among
various subcomponents to ensure most effective memory utilization.

使用SGA_TARGET 初始化参数,Oracle会自动分配给各个组件,使内存得到充分的利用。

The SGA_TARGET initialization parameter reflects the total size of the SGA and
includes memory for the following components:
■ Fixed SGA and other internal allocations needed by the Oracle Database instance
■ The log buffer
■ The shared pool
■ The Java pool
■ The buffer cache
■ The keep and recycle buffer caches (if specified)
■ Nonstandard block size buffer caches (if specified)
■ The Streams pool

Automatically Managed SGA Components
When you set a value for SGA_TARGET, Oracle Database 10g automatically sizes the
most commonly configured components, including:
■ The shared pool (for SQL and PL/SQL execution)
■ The Java pool (for Java execution state)
■ The large pool (for large allocations such as RMAN backup buffers)
■ The buffer cache
■ The Streams pool

点击(此处)折叠或打开

  1. SQL> select * from v$sgainfo;

  2. NAME                            BYTES              RES
  3. -------------------------------- ---------- ---
  4. Fixed SGA Size                  1250356            No
  5. Redo Buffers                    7135232            No
  6. Buffer Cache Size               343932928          Yes
  7. Shared Pool Size                239075328          Yes
  8. Large Pool Size                 4194304            Yes
  9. Java Pool Size                  4194304            Yes
  10. Streams Pool Size               0                  Yes
  11. Granule Size                    4194304            No
  12. Maximum SGA Size                599785472          No
  13. Startup overhead in Shared Pool 37748736           No
  14. Free SGA Memory Available 0

  15. 已选择11行。

  16. SQL> desc v$sgainfo;
  17.  名称 是否为空? 类型
  18.  ----------------------------------------- -------- --------------

  19.  NAME VARCHAR2(32)
  20.  BYTES NUMBER
  21.  RESIZEABLE VARCHAR2(3)

通过如上两段我们可以看到。
如下这些并不包括在自动管理的组件里,是需要我们手动配置的。
■ Fixed SGA and other internal allocations needed by the Oracle Database instance
■ The log buffer
■ The keep and recycle buffer caches (if specified)
■ Nonstandard block size buffer caches (if specified)





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