oracle log_buffer,Granule 与 Redo Log Buffer (log_buffer) 的关系

With dynamic SGA, the unit of allocation is called a granule. Components,

such as the buffer cache, the shared pool, the java pool, and the large

pool, allocate and free SGA space in units of granules. Oracle tracks

SGA memory use in integral numbers of granules, by SGA component. All

information about a granule is stored in a corresponding granule entry. Oracle maintains the state of each granule in the granule entry and the granule type.

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 128 MB, and it is 16 MB for larger SGAs. There may be some

platform dependency, for example, on 32-bit Windows NT, the granule

size is 8 MB for SGAs larger than 128 MB.

The granule size that is currently being used for SGA can be viewed in the view V$SGA_DYNAMIC_COMPONENTS. The same granule size is used for all dynamic components in the SGA.

Note:

If you specify a size for a component that is not a

multiple of granule size, then Oracle rounds the specified size up to

the nearest multiple. For example, if the granule size is 4 MB and you

specify DB_CACHE_SIZE as 10 MB, you will actually be allocated 12 MB.

Oracle keeps information about the components and their granules in a scoreboard.

For each component that owns granules, the scoreboard contains the

number of granules allocated to the component, any pending operations

against this component, the target size in granules, and the progress

made toward the target size. The start time of the operation is also

logged. Oracle maintains the initial number of granules and the maximum

number of granules for each component.

For operations that modify the number of granules, Oracle

logs the operation, the target size, and the start time to the

appropriate SGA component in the scoreboard. Oracle updates the

progress field until the operation is complete. When the operation is

complete, Oracle replaces the current size with the target size and

clears the target size field and the progress field. At the end of the

operation, a database administrator can see how the number of granules

was changed. Oracle updates the initialization parameter values to

reflect the updated amount of SGA in use.

Oracle maintains a circular buffer of the last 100

operations made to the scoreboard. Fixed views show the state of the

scoreboard and the current contents of last 100 operations to the

scoreboard.

Allocating Granules at Startup

At startup, Oracle reads the values in the initialization

parameter file, queries the operating system memory limits, and

allocates virtual address space for the SGA. The initialization

parameter SGA_MAX_SIZE specifies the maximum size of the SGA for the life of the instance in bytes. Its value is rounded up to the next granule size.

Adding Granules to Components

A database administrator grows a component's SGA use with ALTER SYSTEM

statements to modify the initialization parameter values. Oracle takes

the new size, rounds it up to the nearest multiple of 16MB, and adds or

takes away granules to meet the target size. Oracle must have enough

free granules to satisfy the request. If the current amount of SGA

memory is less than SGA_MAX_SIZE, then Oracle can allocate more granules until the SGA size reaches SGA_MAX_SIZE.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值