MEMORY_MAX_TARGET不能完全限制oracle使用内存的比率
2016-10-24 17:19
417 查看
MEMORY_MAX_TARGET不能限制oracle使用内存的比率,因为pga的使用跟程序代码等有关。 如下摘自mos文章
In this Document
Symptoms
Cause
Solution
References
Applies to:
Oracle Database - Enterprise Edition - Version 11.1.0.7 to 11.2.0.4 [Release 11.1 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 24-Dec-2013***
Symptoms
Parameter MEMORY_MAX_TARGET is the maximum limit for parameter MEMORY_TARGET. By setting MEMORY_MAX_TARGET to a value higher than MEMORY_TARGET, MEMORY_TARGET can be dynamically expanded while instance is up and running.
However, the MEMORY_TARGET/MEMORY_MAX_TARGET values can be exceeded in some cases. Total memory can grow beyond the MEMORY_TARGET/MEMORY_MAX_TARGET values. There are some operations that have to be given memory regardless of the
memory limits set by MEMORY_TARGET/MEMORY_MAX_TARGET values (assuming that memory is available at the OS level). An example of such a case is when using PL/SQL memory collections such as PL/SQL tables and varrays. In this case PGA may grow more than calculated
PGA_AGGREGATE_TARGET and this leads to an amount of memory allocated for the instance (SGA+PGA) more than values set for MEMORY_TARGET or MEMORY_MAX_TARGET.
Cause
This is normal behavior. PGA_AGGREGATE_TARGET does not limit the amount of PGA memory usage. It is only a target and is used to dynamically size the process work areas. It does not affect other areas of the PGA that are allowed
to grow beyond this limit. There are certain areas of PGA that cannot be controlled by initialization parameters. Such areas include PL/SQL memory collections such as PL/SQL tables and varrays. Depending on the programming code and amount of data being handled
these areas can grow very large and can consume large amounts of memory.
This behavior was confirmed in:
Bug 10078425 - PGA OF A SESSION EXCEEDING MEMORY_TARGET/MEMORY_MAX_TARGET -- closed as "Not a bug".
Documentation Bug 10322943 - DOC: MEMORY_TARGET/MEMORY_MAX_TARGET CAN BE EXCEEDED
was filed to add update this is possible.
Total memory usage can grow beyond the value of MEMORY_TARGET. For example, memory is allocated to PL/SQL tables and varrays regardless of the value of
MEMORY_TARGET, as long as memory is available at the operating system level.
Solution
In cases where PGA is growing very large because PL/SQL tables or varrays are being used and large amount of records are being handled in memory, expect to use a large amount of process memory. Compensate for this by having enough
free physical memory present on the server to handle such application code.
High memory usage can be avoided by limiting the amount of data being handled by PL/SQL
Or
by changing the PL/SQL code approach and using features such as using LIMIT clause with BULK COLLECT.
In this Document
Symptoms
Cause
Solution
References
Applies to:
Oracle Database - Enterprise Edition - Version 11.1.0.7 to 11.2.0.4 [Release 11.1 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 24-Dec-2013***
Symptoms
Parameter MEMORY_MAX_TARGET is the maximum limit for parameter MEMORY_TARGET. By setting MEMORY_MAX_TARGET to a value higher than MEMORY_TARGET, MEMORY_TARGET can be dynamically expanded while instance is up and running.
However, the MEMORY_TARGET/MEMORY_MAX_TARGET values can be exceeded in some cases. Total memory can grow beyond the MEMORY_TARGET/MEMORY_MAX_TARGET values. There are some operations that have to be given memory regardless of the
memory limits set by MEMORY_TARGET/MEMORY_MAX_TARGET values (assuming that memory is available at the OS level). An example of such a case is when using PL/SQL memory collections such as PL/SQL tables and varrays. In this case PGA may grow more than calculated
PGA_AGGREGATE_TARGET and this leads to an amount of memory allocated for the instance (SGA+PGA) more than values set for MEMORY_TARGET or MEMORY_MAX_TARGET.
Cause
This is normal behavior. PGA_AGGREGATE_TARGET does not limit the amount of PGA memory usage. It is only a target and is used to dynamically size the process work areas. It does not affect other areas of the PGA that are allowed
to grow beyond this limit. There are certain areas of PGA that cannot be controlled by initialization parameters. Such areas include PL/SQL memory collections such as PL/SQL tables and varrays. Depending on the programming code and amount of data being handled
these areas can grow very large and can consume large amounts of memory.
This behavior was confirmed in:
Bug 10078425 - PGA OF A SESSION EXCEEDING MEMORY_TARGET/MEMORY_MAX_TARGET -- closed as "Not a bug".
Documentation Bug 10322943 - DOC: MEMORY_TARGET/MEMORY_MAX_TARGET CAN BE EXCEEDED
was filed to add update this is possible.
Total memory usage can grow beyond the value of MEMORY_TARGET. For example, memory is allocated to PL/SQL tables and varrays regardless of the value of
MEMORY_TARGET, as long as memory is available at the operating system level.
Solution
In cases where PGA is growing very large because PL/SQL tables or varrays are being used and large amount of records are being handled in memory, expect to use a large amount of process memory. Compensate for this by having enough
free physical memory present on the server to handle such application code.
High memory usage can be avoided by limiting the amount of data being handled by PL/SQL
Or
by changing the PL/SQL code approach and using features such as using LIMIT clause with BULK COLLECT.
相关文章推荐
- pga_aggregate_target和_pga_max_size都不能绝对限制实际PGA的使用
- Oracle 11g AMM: MEMORY_TARGET, MEMORY_MAX_TARGET and /dev/shm
- 限制sqlserver最大内存后无法连接-EXEC sp_configure max server memory
- Memory_max_target 与 Memory_target 使用介绍(11g新特性AMM)
- Oracle的memory_max_target和memory_target修改和ORA-00845: MEMORY_TARGET not supported on this system错误解决
- 关于oracle 使用大内存出现:ORA-27102: out of memory
- 设置SDWebImage中maxCacheSize动态管理图片内存缓存大小无效。maxCacheSize和maxMemoryCost的定义和使用。
- linux操作系统下,oracle db 11g中增大memory_max_target和memory_target应该注意的
- Oracle无法修改memory_max_target,memory_target的值
- oracle 11g 减少内存后,启动实例报错:ORA-00845: MEMORY_TARGET not supported on this system
- Oracle调整内存超出限制出现ORA-27100: shared memory realm already exists问题解决办法
- oracle 10g中的SGA_MAX_SIZE与SGA_TARGET的使用方法
- 解决Picasso占用内存,使用Picasso在加载超过2M左右的图片时完全不能显示图片问题(不同的手机可能不同)
- Oracle的memory_max_target和memory_target修改和ORA-00845: MEMORY_TARGET not supported on this system错误解决
- Oracle数据库案例整理-登录Oracle数据库失败-系统内存小于Oracle参数配置的memory_target值
- 32位 系统 4G内存 不能完全使用
- oracle三对内存参数间关系之6pga_aggrate_target参数和memory_参数这两类上下级层次参数间的关系
- Oracle调整内存超出限制出现ORA-27100: shared memory realm already exists问题解决办法
- (2007 6月28日)oracle 在不同平台使用大内存
- 限制某个asp.net应用程序使用的内存的大小