Granule:Oracle内存机制

来源:互联网 发布:淘宝分享有礼效果怎样 编辑:程序博客网 时间:2024/05/18 21:47

Oracle9i开始,Granule现身Oracle河海!

一、标准单间:某公司:写字楼 = Granule:component:SGA 

1.什么东西?为动态SGA的基本单位,SGA组件buffer cache,shared pool等都是按Granule的整数倍来分配和释放的;同一个Granule可以被动态SGA中所有动态组件蹂躏。即便你规定DB_CACHE_SIZE=10M,Oracle也会调整为12MB

2.身份证明?每个Granule都有自己的身份证granule entry,指明Granule 的状态(state)和类型(type)。

3.联系方式?v$SGA_DYNAMIC_COMPONENTS

4.地位大小?由总SGA大小(total SGA size),大多数平台下是4MB(总SGA < 128MB),或者16MB;但在32-bit的瘟到死NT下且总SGA大于128MB前提下,为8M。

 

二、写字楼信息一览版(公司、单间号):写字楼管理经理 = scoreboard : Oracle server

1.存在意义?记录动态组件的信息:配给特定component的granule数,对该component的下一步操作(pending operations),目标granule的大小及其变化的信息与时间(Oracle记录每个component的granule的初始值和最大值)。
2.Oracle记录对granule数目的变化和其修改操作,目标大小(target size),scoreboard上每个component的启动时间(start time),进展(progress),跟新初始化参数文件。

 

三、Granule出场方式&给Component增加Granule Allocating Granules at Startup & Adding Granules to Components

1. 出场步骤?读取参数文件(SGA_MAX_SIZE ) ->  查询OS memory limits -> 为SGA分配虚拟地址空间(allocates virtual address space )

2.如何扩容?ALTER SYSTEM !Oracle让新的值约等于4M和16M的倍数。

 

四、相关查询:关于redo log buffer

1.select * from v$sgainfo where name in ('Fixed SGA Size','Redo Buffers','Granule Size');

2.select sum(bytes)/1024/1024 from v$sgainfo where name in ('Fixed SGA Size','Redo Buffers');

参考源连接:http://www.eygle.com/archives/2009/07/granule_log_buffer.html

原创粉丝点击