Wednesday, March 23, 2011

Oracle Memory Structures


 Description of Figure 8-1 follows

The basic memory structures associated with an Oracle instance include the following:
  System Global Area (SGA): Shared by all server and background processes
 Program Global Area (PGA): Private to each server and background process.
There is one PGA for each process. 
The SGA is a memory area that contains data and control information for the instance.

A Program Global Area (PGA) is a memory region that contains data and control information for each server process. An Oracle server process services a client’s requests. Each server process has its own private PGA that is created when the server process is started. Access to the PGA is exclusive to that server process, and the PGA is read and written only by the Oracle code acting on its behalf. With the dynamic SGA infrastructure, the size of the database buffer cache, the shared pool, the large pool, the Java pool, and the Streams pool changes without shutting down the instance.


A system global area (SGA) is a group of shared memory structures that contain data and control information for one Oracle database instance. If multiple users are concurrently connected to the same instance, then the data in the instance's SGA is shared among the users. Consequently, the SGA is sometimes called the shared global area.
An SGA and Oracle processes constitute an Oracle instance. Oracle automatically allocates memory for an SGA when you start an instance, and the operating system reclaims the memory when you shut down the instance. Each instance has its own SGA.
The SGA is read/write. All users connected to a multiple-process database instance can read information contained within the instance's SGA, and several processes write to the SGA during execution of Oracle.
The SGA contains the following data structures:
  • Database buffer cache
  • Redo log buffer
  • Shared pool
  • Java pool
  • Large pool (optional)
  • Streams pool
  • Data dictionary cache
  • Other miscellaneous information

    The SGA includes the following data structures: 

     Database buffer cache: Caches blocks of data retrieved from the database

     Redo log buffer: Caches redo information (used for instance recovery) until it can be written to the physical redo log files stored on the disk 

    Shared pool: Caches various constructs that can be shared among users 

    Large pool: Is an optional area that provides large memory allocations for certain large processes, such as Oracle backup and recovery operations, and I/O server processes

     Java pool: Is used for all session-specific Java code and data within the Java Virtual Machine (JVM)  Streams pool: Is used by Oracle Streams When you start the instance by using Enterprise Manager or SQL*Plus, the amount of memory allocated for the SGA is displayed. 

Part of the SGA contains general information about the state of the database and the instance, which the background processes need to access; this is called the fixed SGA. No user data is stored here. The SGA also includes information communicated between processes, such as locking information.
If the system uses shared server architecture, then the request and response queues and some contents of the PGA are in the SGA.





No comments:

Post a Comment