You are on page 1of 7

Automatic Memory Management(AMM) on 11g [ID 443746.

1] Modified 10-NOV-2010 In this Document Purpose Scope and Application Automatic Memory Management(AMM) on 11g Introduction to Database Memory Components Evolution of Memory Management Features 1.Automatic Memory Management – For Both the SGA and Instance PGA 2. Automatic Shared Memory Management – For the SGA 3. Manual Shared Memory Management – For the SGA 4. Automatic PGA Memory Management – For the Instance PGA 5.Manual PGA Memory Management – For the Instance PGA References Type BULLETIN

Applies to:
Oracle Server - Enterprise Edition - Version: to - Release: 11.1 to 11.1 Information in this document applies to any platform. Oracle Server Enterprise Edition - Version: to

Checked for relevance 11-10-2010 The main goal of this document is to discuss Automatic Memory Management(AMM) features introduced with Oracle11g and

Scope and Application
All the DBAs and users concerned with Database Administration activities.

Automatic Memory Management(AMM) on 11g
Rate this document

Introduction to Database Memory Components
The basic memory structures associated with Oracle Database include: ■ System Global Area (SGA)

The SGA is a group of shared memory structures, known as SGA components, that contain data and control information for o ■ Program Global Area (PGA)

A PGA is a memory region that contains data and control information for a server process. It is nonshared memory each server process. Background processes also allocate their own PGAs. The total PGA memory allocated for all backgroun collection of all individual PGAs is referred to as the total instance PGA, or just instance PGA.

It contains global variables and data structures and control information for a server process. example of such information is th

1 . The performance of complex long running queries. https://support. Evolution of Memory Management Features Memory management has evolved with each database release Oracle 9i Beginning with typical in a DSS You enable the automatic shared memory managem Oracle Database 11g Automatic Memory Management is being introduced in 11g. This enables automatic tuning of PGA and SGA with use of two n The most important SGA components are the following: Component Database Buffer Cache Description The database buffer cache is the portion of from datafiles. the dynamic SGA infrastructure allowed for the sizing of the Buffer Cache. All users concurrently connec database buffer cache. depend to a large extent on the memory ava Below figure illustrates the relationships among these memory structures. Shared Pool and the Larg • • • • Dynamic Memory resizing DB_CACHE_SIZE instead of DB_BLOCK_BUFFERS DB_nK_CACHE_SIZE for multiple block sizes PGA_AGGREGATE_TARGET Introduction of Automatic PGA Memory management Oracle Database 10g Automatic Shared Memory Management (ASMM) was introduced in 10g.region of the server process executing that cursor.

which are chosen by initialization parameter 1.----------. 5. Shared Pool The shared pool portion of the SGA contains result cache. automa you to select automatic memory management.Redo Log Buffer The redo log buffer is a circular buffer in the made to the database. if necessary. 2. You have to use RESULT_CACHE_MODE initialization parameter which determines the SQL query result cache behavior. The databa Result can also be cached.1 .com/CSP/main/article?cmd=show&type=NOT&id=443746. Oracle Database can manage the SGA memory and instance PGA memory completely exchanges memory between the SGA and the instance PGA as needed to meet processing demands. DELETE. two new parameters have been introduced named MEMORY_MAX_TARGET and MEMORY_TARGET maximum memory size initialization parameter (MEMORY_MAX_TARGET). Switching to Automatic Memory Management 1)Check the current values configured for SGA_TARGET and PGA_AGGREGATE_TARGET. Oracle Database 11g supports various memory management methods.Automatic Memory Management – For Both the SGA and Instance PGA Beginning with Oracle Database 11g. * RESULT_CACHE_MAX_SIZE is new component which has been introduced as part of 11g Memory architecture. If you create your database with Database Configuration Assistant (DBCA) and choose the basic installation option. 3. The streams pool is used exclusively by Ora queue messages. The res infrastructure. Automatic Memory Management – For Both the SGA and Instance PGA Automatic Shared Memory Management – For the SGA Manual Shared Memory Management – For the SGA Automatic PGA Memory Management – For the Instance PGA Manual PGA Memory Management – For the Instance PGA 1.---------------archive_lag_target integer 0 https://support. This capability is sizes of the individual SGA components and the sizes of the individual PGAs. or D database recovery. CREATE. Java pool memory is used in server memory within the JVM. ALTER. To achieve this. buffers for parallel execution m Large Pool Java Pool Streams Pool Used for allocating session memory for shar or for RMAN. or red UPDATE. and it provides memory fo processes.Results of queries and query fragments can be cached in memory in the SQL query result cache. SQL>SHOW PARAMETER TARGET NAME TYPE VALUE -----------------------------. This information is st information necessary to reconstruct.

1 . MEMORY_MAX_TARGET is a static parameter i. Using Pfile ======= If you have started the instance with Pfile. SGA_TARGET =0 SCOPE = SPFILE.db_flashback_retention_target integer 1440 fast_start_io_target integer 0 fast_start_mttr_target integer 0 memory_max_target big integer 0 memory_target big integer 0 pga_aggregate_target big integer 200M sga_target big integer 500M Add the values of pga_aggregate_target and sga_target. the MEMORY_TARGET param does not exceed the value of MEMORY_MAX_TARGET. ORACLE instance shut down. Database closed. Total System Global Area 845348864 Fixed Size 1303188 Variable Size 469765484 Database Buffers 369098752 Redo Buffers 5181440 SQL> show parameter target bytes bytes bytes bytes bytes NAME TYPE VALUE Using Spfile ======== SQL>ALTER SQL>ALTER SQL>ALTER SQL>ALTER SYSTEM SYSTEM SYSTEM SYSTEM SET SET SET SET MEMORY_MAX_TARGET = 808M SCOPE = Database dismounted.e it cannot be changed Dynamically and Instance has to be bounced for m 4)Shutdown and startup the database SQL> shutdown immediate.----------. PGA_AGGREGATE_TARGET = 0 SCOPE = SPFILE. In our case it would sum to 700 M 2)Decide on a maximum amount of memory that you would want to allocate to the database which will determine the maximu 3)Change the parameter in initialization parameter file. MEMORY_TARGET = 808M SCOPE = SPFILE. SQL> startup mount ORACLE instance started.------------------------------ https://support. then edit the pfile and set the parameters manually MEMORY_MAX_TARGET = 808M MEMORY_TARGET = 808M SGA_TARGET =0 PGA_AGGREGATE_TARGET = 0 In case you do not specify any value for MEMORY_MAX_TARGET and only use MEMORY_TARGET then database If you omit the line for MEMORY_TARGET and include a value for MEMORY_MAX_TARGET.

archive_lag_target db_flashback_retention_target fast_start_io_target fast_start_mttr_target memory_max_target memory_target pga_aggregate_target sga_target integer integer integer integer big integer big integer big integer big integer 0 1440 0 0 808M 808M 0 0 The preceding steps instruct you to set SGA_TARGET and PGA_AGGREGATE_TARGET to zero so that the sizes of the SG parameter values to zero and leave either or both of the values as positive numbers.How To Use Automatic Shared Memory Management (ASMM) In Oracle10g In case you have enabled Automatic Memory Management . In this case. You can also use V$MEMORY_RESIZE_OPS which has a circular history buffer of the last 800 SGA resize requests. then you get the following e SQL> startup ORA-00844: Parameter not taking MEMORY_TARGET into account. you can disable both automatic memory management determining the overall SGA size. 2.1 .1 . In this case you set SGA_TARGET and MEMORY_TARGET to 0 and set value for other SGA components upto value of SGA https://support. // *Action: Set the parameter to a lower value than MEMORY_TARGET. SQL>Alter system set SGA_TARGET=500M scope=both. Manual Shared Memory Management – For the SGA If you want complete control of individual SGA component sizes. see alert log for more information 00844. the sizes of the different SGA components are flexible and can adapt Please refer to following document for setting SGA_TARGET Note 295626. SQL> select * from v$memory_target_advice order by memory_size. Automatic Shared Memory Management – For the SGA If you want to exercise more direct control over the size of the SGA.In case you set any parameter value to value which is higher then MEMORY_TARGET. see alert log for more information" // *Cause: The parameter was larger than MEMORY_TARGET. Monitoring and Tuning Automatic Memory Management The dynamic performance view V$MEMORY_DYNAMIC_COMPONENTS shows the current sizes of all dynamically tuned The view V$MEMORY_TARGET_ADVICE provides tuning advice for the MEMORY_TARGET initialization parameter. the values act as minimum Note : . then to switch to Automatic Shared Memory Management . You then manually tune these individual SGA components on an ongoing basis. you can disable automatic memory management and ena When automatic SGA memory management is pleas SQL>Alter system set MEMORY_TARGET=0 scope=both. "Parameter not taking MEMORY_TARGET into account. 00000.

1 . PGA memory is allocated based upon value of MEMORY_TARGET.1 . The resulting PGA memory is then allotted to Please refer to following document for more details on Automatic PGA Memory Management Note 223730.1 .Automatic PGA Memory Managment in 9i and 10g 5. you set a target size for the instance PGA by defining value for parameter named ignored for these sessions. This feature is available from 9i. PGA memory management.Please refer to Note 148495. At any given time. Automatic PGA Memory Management – For the Instance PGA While using Automatic memory management .oracle. Oracle strongly recommends th Table below summarizes the various memory management methods Memory Management Mode Automatic memory management(AMM) SGA and PGA For Automatic shared memory management(ASMM) (AMM disabled) Manual shared memory management (AMM and ASMM disabled) SGA SGA https://support. HA Although the Oracle Database 11g supports this manual PGA memory management method. the total amount of PGA memory available to active work areas on the instance is automatically PGA memory allocated for other purposes (for example.Manual PGA Memory Management – For the Instance PGA In case you wish to manually specify the maximum work area size for each type of SQL operator (such as sort or hash Set WORKAREA_SIZE_POLICY value to MANUAL and also specify values for *_area_size such as SORT_AREA_SIZE. session memory). Automatic/Manual PGA memory management is decided by initialization parameter WORKAREA_SIZE_POLICY With automatic PGA memory management.Dynamic SGA

How To Use Automatic Shared Memory Management (ASMM) In Oracle10g Attachments Oracle Database Memory Structures (14. DB_CACHE_SIZE. The SGA Memory Broker keeps tr References NOTE:148495. SHARED_POOL_SIZE. INITIALIZATION PGA Memory Management . SGA_MAX_SIZE.16 KB) Related Products • Oracle Database Products > Oracle Database > Oracle Database > Oracle Server .Automatic PGA memory management PGA Manual PGA memory management (not recommended) PGA The Automatic Memory Management (AMM) feature uses background process named Memory Manager (MMAN) serves as the SGA Memory Broker and coordinates the sizing of the memory components.1 .Enterprise Edition Keywords DYNAMIC SGA.1 .Dynamic SGA NOTE:223730.1 . SHAR Errors ORA-844 Back to top https://support.