Saturday, March 26, 2011

Instance Memory Structures

Instance Memory Structures:
The System Global Area is a shared memory region that conatains data and control information for
one oracle instance. Oracle allocates the SGA when instance is starts and deallocates it when
instance is shutdown. Each instance has its own  SGA. SGA is divided into serveral type of memory
structure:
1.  Database buffer : store the most recently used blocks of data. The buffer cache contains
modified as well as unmodified blocks.becouse the most recently used data is kept in memory ,less
disk I/O is necessary and performance is improved.
The buffers in the cache are organized in two lists: the write list and the least recently used (LRU)
list. The write list holds dirty buffers, which contain data that has been modified but has not yet
been written to disk. The LRU list holds free buffers, pinned buffers, and dirty buffers that have
not yet been moved to the write list. Free buffers do not contain any useful data and are available
for use. Pinned buffers are currently being accessed.
2. The Redo log buffer: stores redo entries  a lot of changes made to the database . redo log buffer is
used if database recovery is necessary . the size of the redo log is static.
3. Shared pool : contains shared memory constructs ,suchas shared SQL areas which is required to
process every unique SQL statement submitted to a database and contains information  such as the
parse tree and execution plan for the corresponding statement and used by multiple applications that
issue the same statement leaving more shared memory for other uses.
The library cache: includes the shared SQL areas, private SQL areas (in the case of a shared server
configuration), PL/SQL procedures and packages, and control structures such as locks and library
cache handles
The data dictionary :is a collection of database tables and views containing reference information
about the database, its structures, and its users. Oracle accesses the data dictionary frequently
during SQL statement parsing. This access is essential to the continuing operation of Oracle.
4. Large Pool: The database administrator can configure an optional memory area called the large pool
to provide large memory allocations for:
Session memory for the shared server and the Oracle XA interface (used where transactions
interact with more than one database)
I/O server processes
Oracle backup and restore operations
By allocating session memory from the large pool for shared server, Oracle XA, or parallel query
buffers, Oracle can use the shared pool primarily for caching shared SQL and avoid the performance
overhead caused by shrinking the shared SQL cache.
In addition, the memory for Oracle backup and restore operations, for I/O server processes, and for
parallel buffers is allocated in buffers of a few hundred kilobytes. The large pool is better able to
satisfy such large memory requests than the shared pool.
5. Java Pool memory : is used in server memory for all session-specific Java code and data within the
JVM. Java pool memory is used in different ways, depending on what mode the Oracle server is
running in.
6. Streams:Oracle Streams enables information sharing. Using Oracle Streams, you can share
data and events in a stream. The stream can propagate information within a
database or from one database to another. The stream routes specified information
to specified destinations. The result is a feature that provides greater functionality
and flexibility than traditional solutions for capturing and managing events, and
sharing the events with other databases and applications. Streams provides the
capabilities needed to build and operate distributed enterprises and applications,
data warehouses, and high availability solutions. You can use all of the capabilities
of Oracle Streams at the same time. If your needs change, then you can implement a
new capability of Streams without sacrificing existing capabilities.

No comments:

Post a Comment