Automatic Shared Memory Management
Automatic Shared Memory Management
(ASMM) adjusts the sizes of the SGA components
on the fly as the workload changes.
Automatic Shared Memory Management
(ASMM), a 10g and 11g feature, is meant to
simplify SGA management.
Do not confuse ASMM with AMM (Automatic
Memory Management).
ASMM was introduced in Oracle 10g.
AMM is new in 11g and will be addressed
in this chapter.
The DBA specifies the amount of memory available
to an instance via the
sga_target
parameter.
The Oracle database periodically
redistributes memory between the components
according to workload requirements.
This solves the allocation issues that
are normally faced when using the manual method.
Under-sizing memory settings can lead to
poor performance and out-of memory errors
(ORA-4031).
If a non-zero value is specified for
sga_target,
the following six memory pools are automatically
sized by Oracle:
Figure 2.3 shows an example of auto-tuned SGA
components.
Figure 2.3:
SGA Memory Buffers Managed Dynamically Using
ASMM
When using ASMM, configuration of the following
buffers remains manual:
When
sga_target
is set, the total size of manual SGA parameters
are subtracted from the
sga_target value and the balance
is given to the auto-tuned SGA components.
Sga_target
is also a dynamic parameter and can be changed
through Enterprise Manager or with the ALTER
SYSTEM command. However, the
sga_target can be increased only
up to the value of
sga_max_size.
Important:
statistics_level must be set to TYPICAL
(default) or ALL to use Automatic Shared
Memory Management.
Program Global Area (PGA)
A Program Global Area
(PGA) is a memory region that stores the data
and control information for the server
processes. Each server process has a non-shared
memory region created by Oracle when a server
process is started. Access to the PGA is
exclusive to that server process, and it is read
and written only by Oracle code. Broadly
speaking, PGA contains a private SQL area and a
session memory area.
A private SQL area contains data such as bind
information and runtime memory structures. Each
session that issues a SQL statement has a
private SQL area.
Session memory is the memory allocated to
hold a session’s variables, logon information,
and other information related to the session.
With the initialization parameter
pga_aggregate_target,
sizing of work areas for all dedicated sessions
is made automatic, and all
*_area_size parameters are ignored
for these sessions.
How to disable AMM:
See these
important notes on disabling AMM (Automatic
Space Memory Management)