Sunday 24 July 2016

Detailed Explanation Of Physical Architecture

1.       SGA (System Global Area)
The SGA is a read/write memory area that stores information shared by all database processes and by all users of the database (sometimes it is called the Shared Global Area).
  •  The SGA is allocated in memory and virtual memory. 
  •  The size of the SGA can be established by a DBA by assigning a value to the parameter SGA_MAX_SIZE in the parameter file—this is an optional parameter.
The SGA is allocated when an Oracle instance (database) is started up based on values specified in the initialization parameter file (either PFILE or SPFILE). 

The SGA has the following mandatory memory structures:
  •  Database Buffer Cache
  •  Redo Log Buffer
  •  Java Pool
  •  Streams Pool
  •  Shared Pool – includes two components:  1.  Library Cache Data      2.  Dictionary Cache
  Additional optional memory structures in the SGA include          
  • Large Pool


 Note: Early versions of Oracle used a Static SGA.  This meant that if modifications to memory management were required, the database had to be shutdown, modifications were made to the init.ora parameter file, and then the database had to be restarted.
Oracle 11g uses a Dynamic SGA.   Memory configurations for the system global area can be made without shutting down the database instance.  The DBA can resize the Database Buffer Cache and Shared Pool dynamically. 

Memory is allocated to the SGA as contiguous virtual memory in units termed granules.  Granule size depends on the estimated total size of the SGA, which as was noted above, depends on the SGA_MAX_SIZE parameter.  Granules are sized as follows:
  •  If the SGA is less than 1 GB in total, each granule is 4 MB.
  •  If the SGA is greater than 1 GB in total, each granule is 16 MB.
Granules are assigned to the Database Buffer Cache, Shared Pool, Java Pool, and other memory structures, and these memory components can dynamically grow and shrink. 

2.  Program Global Area (PGA)

A private memory region that contains the data and control information for a server process. Only a server process can access the PGA. Oracle Database reads and writes information in the PGA on behalf of the server process. There is one PGA for each server process. Background processes also allocate their own PGAs.




3.  User Global Area

The User Global Area is session memory.
The UGA must be available to a database session for the life of the session.  For this reason, the UGA cannot be stored in the PGA when using a shared server connection because the PGA is specific to a single process.  Therefore, the UGA is stored in the SGA when using shared server connections, enabling any shared server process access to it. When using a dedicated server connection, the UGA is stored in the PGA.
END OF NOTES



No comments:

Post a Comment