Beruflich Dokumente
Kultur Dokumente
Jephe Wu - http://linuxtechres.blogspot.com
Concepts:
The SGA is a group of shared memory structures, known as SGA components, that contain
data and control information for one Oracle Database instance.
A PGA is a memory region that contains data and control information for a server process. It
is nonshared memory created by Oracle Database when a server process is started
There is one PGA for each server process. Background processes also allocate their own
PGAs.
ASMM: Automatic Shared Memory Management (ASMM) was introduced in 10g. You enable
the automatic shared memory management feature by setting the SGA_TARGET parameter
to a non-zero value.
SGA: contains database buffer cache, redo log buffer, shared pool, large pool, Java pool and
streams pool
The shared pool portion of the SGA contains the library cache, the dictionary cache, the
result cache, buffers for parallel execution messages, and control structures.
Configuration:
1. AMM in 11g:
Two new parameters have been introduced named MEMORY_MAX_TARGET and
MEMORY_TARGET. To do so (on most platforms), you set only a target memory size
initialization parameter (MEMORY_TARGET) and optionally a maximum memory size
initialization parameter (MEMORY_MAX_TARGET).
SQL>ALTER SYSTEM SET MEMORY_MAX_TARGET = 800M SCOPE = SPFILE; (must bounce
database if change it)
SQL>ALTER SYSTEM SET MEMORY_TARGET = 800M SCOPE = SPFILE; (dynamically can be
changed actually)
SQL>ALTER SYSTEM SET SGA_TARGET =0 SCOPE = SPFILE;
SQL>ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0 SCOPE = SPFILE;
MEMORY_MAX_TARGET = 808M
MEMORY_TARGET = 808M
SGA_TARGET =0
PGA_AGGREGATE_TARGET = 0
2. ASMM in 10g
If you'd like to disable AMM, only enable ASMM, then
sql>alter system set memory_max_target=0 scope=spfile;
4. pga_aggregate_target
With automatic PGA memory management, you set a target size for the instance PGA by
defining value for parameter named PGA_AGGREGATE_TARGET and sizing of SQL work
areas is automatic and all *_AREA_SIZE initialization parameters are ignored for these
sessions
5. best practise:
in 11g, set AMM(memory_target and memory_max_target, unset others)
in 10g, set ASMM(sga_target,sga_max_size and pga_aggregate_target)