Configuring the Reserved Pool

Database Performance Tuning Guide


7.3.8 Configuring the Reserved Pool

Although Oracle Database breaks down very large requests for memory into smaller chunks, on some systems there might still be a requirement to find a contiguous chunk (for example, over 5 KB) of memory. (The default minimum reserved pool allocation is 4,400 bytes.)
尽管oracle会将大的内存请求 切成 多个小的内存块,但在有些系统上仍旧会有需要一个连续的大的内存块的情况(比如大于5K,默认在Reserved pool中分配的内存块最小要达到 4400 bytess)。

If there is not enough free space in the shared pool, then Oracle Database must search for and free enough memory to satisfy this request. This operation could conceivably hold the latch resource for detectable periods of time, causing minor disruption to other concurrent attempts at memory allocation.
如果shared pool没有足够的内存,oracle数据库必须 搜索 并 清理一些shared pool中的内容 来满足内存分配请求。在这个过程中,操作 肯定会获取latch资源,或多或少会影响到其它试图要分配内存的并发。

Thus, Oracle Database internally reserves a small memory area in the shared pool that the database can use if the shared pool does not have enough space. This reserved pool makes allocation of large chunks more efficient.
因此,oracle数据库内部会在shared pool中 保留 一个小的内存区域(reserved pool),当shared pool没有足够的内存时可以使用这个保留区域。reserved pool可以提高大的内存块的分配效率。

By default, Oracle Database configures a small reserved pool. The database can use this memory for operations such as PL/SQL and trigger compilation or for temporary space while loading Java objects. After the memory allocated from the reserved pool is freed, it returns to the reserved pool.
oracle数据库默认会配置一个小的reserved pool。数据库在 编译 PL/SQL、触发器 时会用到reserved pool,或是 截入java对象时的临时空间也是从reserved pool中分配。

You probably will not need to change the default amount of space Oracle Database reserves. However, if necessary, the reserved pool size can be changed by setting theSHARED_POOL_RESERVED_SIZE initialization parameter. This parameter sets aside space in the shared pool for unusually large allocations.
你可能不需要修改数据库reserved pool的默认设置。如果有必要修改的话,可以通过设置初始化参数SHARED_POOL_RESERVED_SIZE来改变reserved pool的大小。这个参数会在shared pool中留出空间来供不常用的大内存块分配使用。

For large allocations, Oracle Database attempts to allocate space in the shared pool in the following order:
大内存块的分配,oracle数据库尝试以下顺序在shared pool中分配:

  1. From the unreserved part of the shared pool.
    从reserved pool以外的区域分配。

  2. From the reserved pool. If there is not enough space in the unreserved part of the shared pool, then Oracle Database checks whether the reserved pool has enough space.
    从reserved pool中分配。如果reserved pool以外的区域没有足够的内存,oracle数据库会检查reserved pool中是否有足够的内存。

  3. From memory. If there is not enough space in the unreserved and reserved parts of the shared pool, then Oracle Database attempts to free enough memory for the allocation. It then retries the unreserved and reserved parts of the shared pool.
    从内存中。如果shared pool中没有足够的内存,oracle数据库会尝试清理一些shared pool中的内容,来获取足够的内容供分配。然后再次尝试上面的分配内存的两个步骤。

7.3.8.1 Using SHARED_POOL_RESERVED_SIZE

The default value for SHARED_POOL_RESERVED_SIZE is 5% of the SHARED_POOL_SIZE. This means that, by default, the reserved list is configured.
SHARED_POOL_RESERVED_SIZE的默认值是SHARED_POOL_SIZE的5%。这表示reserved list默认是配置的。

If you set SHARED_POOL_RESERVED_SIZE to more than half of SHARED_POOL_SIZE, then Oracle Database signals an error. Oracle Database does not let you reserve too much memory for the reserved pool. The amount of operating system memory, however, might constrain the size of the shared pool. In general, setSHARED_POOL_RESERVED_SIZE to 10% of SHARED_POOL_SIZE. For most systems, this value is sufficient if you have tuned the shared pool. If you increase this value, then the database takes memory from the shared pool. (This reduces the amount of unreserved shared pool memory available for smaller allocations.)
如果SHARED_POOL_RESERVED_SIZE的设置大于SHARED_POOL_SIZE的一半,则oracle数据库会报错。oracle不会让你为reserved pool保留太多的内存。还有,操作系统的内存或许会限制到shared pool的大小。

Statistics from the V$SHARED_POOL_RESERVED view help you tune these parameters. On a system with ample free memory to increase the size of the SGA, the goal is to have the value of REQUEST_MISSES equal zero. If the system is constrained for operating system memory, then the goal is to not have REQUEST_FAILURES or at least prevent this value from increasing.
V$SHARED_POOL_RESERVED中的统计信息会帮助你调整这些参数。在一个内存充足的系统上调整sga大小,以达到REQUEST_MISSES的值等于0。如果系统受到操作系统内存的限制,也最好不要有REQUEST_FAILURES,或是至少REQUEST_FAILURES的值不增加。

If you cannot achieve these target values, then increase the value for SHARED_POOL_RESERVED_SIZE. Also, increase the value for SHARED_POOL_SIZE by the same amount, because the reserved list is taken from the shared pool.
如果达不到目标值,则要增大SHARED_POOL_RESERVED_SIZE的值。SHARED_POOL_SIZE也需要增加相同的大小,因为reserved list从shared pool中分配。

See Also:

Oracle Database Reference for details on setting the LARGE_POOL_SIZE parameter
7.3.8.2 When SHARED_POOL_RESERVED_SIZE Is Too Small

The reserved pool is too small when the value for REQUEST_FAILURES is more than zero and increasing. To resolve this, increase the value for the SHARED_POOL_RESERVED_SIZE and SHARED_POOL_SIZE accordingly. The settings you select for these parameters depend on your system's SGA size constraints.
当REQUEST_FAILURES的值大于0,并且在增大时,则说明reserved pool的值太小了。此时需要增大SHARED_POOL_RESERVED_SIZE的值,并相应的增大SHARED_POOL_SIZE。

Increasing the value of SHARED_POOL_RESERVED_SIZE increases the amount of memory available on the reserved list without having an effect on users who do not allocate memory from the reserved list.
增大SHARED_POOL_RESERVED_SIZE的大小对不从reserved list分配内存的用户没有影响。

7.3.8.3 When SHARED_POOL_RESERVED_SIZE Is Too Large

Too much memory might have been allocated to the reserved list if:
以下情况可能分配了太多的空间给reserved list:

  • REQUEST_MISSES is zero or not increasing
    REQUEST_MISSES等于0或是不增长

  • FREE_SPACE is greater than or equal to 50% of SHARED_POOL_RESERVED_SIZE minimum
    FREE_SPACE大于等于SHARED_POOL_RESERVED_SIZE的50%

If either of these conditions is true, then decrease the value for SHARED_POOL_RESERVED_SIZE.
如果任一条件成立,则可以缩小SHARED_POOL_RESERVED_SIZE的值。

7.3.8.4 When SHARED_POOL_SIZE is Too Small

The V$SHARED_POOL_RESERVED fixed view can also indicate when the value for SHARED_POOL_SIZE is too small. This can be the case if REQUEST_FAILURES is greater than zero and increasing.
V$SHARED_POOL_RESERVED视图也可以显示SHARED_POOL_SIZE的值是不是太小。如果REQUEST_FAILURES大于0或是增长,则说明SHARED_POOL_SIZE太小。

If you have enabled the reserved list, then decrease the value for SHARED_POOL_RESERVED_SIZE. If you have not enabled the reserved list, then you could increaseSHARED_POOL_SIZE.
如果你启用了reserved list,则需要缩小SHARED_POOL_RESERVED_SIZE的值。没有启用reserved list,则需要增加SHARED_POOL_SIZE。

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

转载于:http://blog.itpub.net/7417681/viewspace-2124938/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值