Friday, March 25, 2011

- Oracle 11g Automatic Memory Management (AMM) --

Let's start with a brief introduction to basic concepts.

PROGRAM GLOBAL AREA (PGA): is a region that contains data and control information for a server process, this is non shared memory created by the database when a server process is started and access is exclusive to the particular server process.SH
SHARED_GLOBAL_AREA (SGA) :  Is a group of memory structures that contain data and control information for the Oracle instance, it is shared by all background processes.


Oracle has made great progress to simplify memory management through the last versions of the RDBMS. In 9i they introduced PGA management, in 10g they automated the SGA management and in 11g you can manage both (PGA and SGA) with a single configuration using "Automatic Memory Management (AMM)". AMM allows you to allocate a chunk of memory which Oracle uses to manage both SGA and PGA, AMM uses 2 parameters:

MEMORY_TARGET: Amount of memory available to Oracle to use dynamically to control SGA and PGA, this is the amount of memory Oracle will allocate when you start the database to manage PGA and SGA.

MEMORY_MAX_TARGET: Maximum amount of memory that Oracle can use, when no specified the max is equal to MEMORY_TARGET.

When  AMM is in use, SGA_TARGET (Introduced in 10g) and PGA_AGGREGATE_TARGET (Introduced in 9i)  act as the minimum size setting for their respective areas. It is recommend to set this to 0 when using AMM so Oracle can take full control of it.

No comments: