Sunday, May 9, 2010

SGA_TAREGET, Automatic Memory Management

SGA_TAREGET, Automatic Memory Management
SGA_TARGET is a database initialization parameter (introduced in Oracle 10g) that can be used for automatic SGA memory sizing. If SGA_TARGET parameter has some value assigned then oracle server goes for automatic memory management.
Below, sga_target has some value set for it. So oracle goes for automatic memory management. In this mode oracle takes care of the allocation of memory for the below parameters.
DB_CACHE_SIZE (DEFAULT buffer pool)
SHARED_POOL_SIZE (Shared Pool)
LARGE_POOL_SIZE (Large Pool)
JAVA_POOL_SIZE (Java Pool)

SQL> show parameter sga_target
NAME TYPE VALUE
------------------------------------ ----------- -----------------
sga_target big integer 276M

when database is in automatic memory management mode the parameters (db_cache_size, shared_pool_size, large_pool_size and java_pool_size) are set to zero. It does not mean they are actually zero.
In automatic memory management , - the __ (underscore/underscore) settings are placed in the parameter file to remember their last setting - the last value we decided was right - so that when restart, start where we left off
But when we query like,

SQL> show parameter db_cache_size

NAME TYPE VALUE
------------------------------------ ----------- --------------------------
db_cache_size big integer 0
SQL> show parameter shared_pool_size

NAME TYPE VALUE
------------------------------------ ----------- --------------------------
shared_pool_size big integer 0

We get zeros since there is no set for any of the cache sizes - the default MINIMUM size is specified - and that is zero. When using automatic memory management - the *_cache sizes are MINIMUMS and the __ are our reminders of the last size we decided to use.

No comments: