1.说明
utomatic memory management automatically manages the memory-related parameters for both Oracle ASM and database instances with the MEMORY_TARGET parameter. Automatic memory management is enabled by default on an Oracle ASM instance, even when the MEMORY_TARGET parameter is not explicitly set. The default value used for MEMORY_TARGET is acceptable for most environments. This is the only parameter that you must set for complete Oracle ASM memory management. Oracle strongly recommends that you use automatic memory management for Oracle ASM.
默认情况下,Oracle ASM实例是启用自动内存管理的,并且Oracle强烈建议为ASM使用自动内存管理。
n Oracle ASM instance can automatically increase the values set for MEMORY_TARGET and MEMORY_MAX_TARGET if an ORA-04031 error is raised and automatic memory management is enabled. If MEMORY_MAX_TARGET has been explicitly set to a value, then every time ORA-04031 is raised, the MEMORY_TARGET value is increased by 10% of the existing MEMORY_TARGET value or 128 MB, whichever is greater, but not greater than the customer specified MEMORY_MAX_TARGET value. If MEMORY_MAX_TARGET is not explicitly set, then both MEMORY_TARGET and MEMORY_MAX_TARGET are increased by 10% of the existing MEMORY_TARGET value or 128 MB, whichever is greater, for a maximum of five increases. The Oracle ASM instance must be rebooted to use the new MEMORY_TARGET and MEMORY_MAX_TARGET settings.
如果启用了ORA-04031错误并启用了自动内存管理,Oracle ASM实例可以自动增加MEMORY_TARGET和MEMORY_MAX_TARGET的值。如果MEMORY_MAX_TARGET被显式地设置为一个值,那么每次出现ORA-04031错误时,MEMORY_TARGET值都会增加现有MEMORY_TARGET值的10%或128 MB,无论哪个更大,但不能超过用户指定的MEMORY_MAX_TARGET的大小。如果没有显式地设置MEMORY_MAX_TARGET,那么MEMORY_TARGET和MEMORY_MAX_TARGET都增加了现有MEMORY_TARGET值的10%或128 MB,无论哪个更大,增加大小次数最大值为5次。必须重新启动Oracle ASM实例才能使MEMORY_TARGET和MEMORY_MAX_TARGET生效。
f you do not set a value for MEMORY_TARGET, but you do set values for other memory related parameters, Oracle internally calculates the optimum value for MEMORY_TARGET based on those memory parameter values. You can also increase MEMORY_TARGET dynamically, up to the value of the MEMORY_MAX_TARGET parameter, just as you can do for the database instance.
如果你没有为MEMORY_TARGET设置一个值,但是你设置了其他内存相关参数的值,那么Oracle内部会根据这些内存参数值计算MEMORY_TARGET的最优值。你还可以动态地增加MEMORY_TARGET大小,达到MEMORY_MAX_TARGET一样大小。
lthough it is not recommended, you can disable automatic memory management by either setting the value for MEMORY_TARGET to 0 in the Oracle ASM parameter file or by running an ALTER SYSTEM SET MEMORY_TARGET=0 statement. When you disable automatic memory management, Oracle reverts to automatic shared memory management and automatic PGA memory management. To revert to Oracle Database 10g Release 2 (10.2) functionality to manually manage Oracle ASM SGA memory, also run the ALTER SYSTEM SET SGA_TARGET=0 statement. Unless specified, the behaviors of the automatic memory management parameters in Oracle ASM instances behave the same as in Oracle Database instances.
虽然不推荐使用,但是可以通过在Oracle ASM参数文件中将MEMORY_TARGET的值设置为0,或者通过执行ALTER SYSTEM SET MEMORY_TARGET=0语句来禁用自动内存管理。当禁用自动内存管理时,Oracle将恢复到自动共享内存管理和自动PGA内存管理。要恢复Oracle Database 10g R2(10.2)的手动管理Oracle ASM SGA内存,也运行ALTER SYSTEM SET SGA_TARGET=0语句。除非指定,Oracle ASM实例中的自动内存管理参数的行为与Oracle数据库实例中的行为相同。
注意:
对于linux环境,如果/dev/shm不可用,那么自动内存管理讲无法工作。
Oracle ASM的MEMORY_TARGET的最小值为1G,如果设置小于1G,Oracle也会自动增加到1G。
2.查看MEMORY_TARGET和memory_max_target
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_max_target big integer 1076M
memory_target big integer 1076M
3禁用自动内存管理
虽然不推荐使用,但是可以通过在Oracle ASM参数文件中将MEMORY_TARGET的值设置为0,或者通过执行ALTER SYSTEM SET MEMORY_TARGET=0语句来禁用自动内存管理。
版权声明:本文为博主原创文章,未经博主允许不得转载。
AMM