Thursday, June 6, 2013

Oracle Memory Architecture


 Oracle uses three kinds of memory structures

SGA
(System Global Area)
is a large part of memory that all the oracle background processes access.
PGA  
(Process Global Area)
This is memory that is private to a single process or thread and is not accessible by any other process or thread
UGA
(User Global Area)
This is memory that is assoicated with your session, it can be found in the PGA or SGA depending on whether you are connected to the database via shared server
Shared Server - the UGA will be in the SGA
Dedicated Server - the UGA will be in the PGA

SGA
There are five memory structures that make up the System Global Area (SGA). The SGA will store many internal data structures that all processes need access to, cache data from disk, cache redo data before writing to disk, hold parsed SQL plans and so on.

The fixed SGA contains a set of variables that point to the other components of the SGA, and variables that contain the values of various parameters., the area is a kind of bootstrap section of the SGA, something that Oracle uses to find other bits and pieces of the SGA

PGA and UGA
The PGA (Process Global Area) is a specific piece of memory that is associated with a single process or thread, it is not accessible by any other process or thread, note that each of Oracles background processes have a PGA area. The UGA (User Global Area) is your state information, this area of memory will be accessed by your current session, depending on the connection type (shared server) the UGA can be located in the SGA which is accessible by any one of the shared server processes, because a dedicated connection does not use shared servers the memory will be located in the PGA
  • Shared server - UGA will be part of the SGA
  • Dedicated server - UGA will be the PGA
 Oracle creates a PGA area for each users session, this area holds data and control information, the PGA is exclusively used by the users session. Users cursors, sort operations are all stored in the PGA. The PGA is split in to two areas

No comments:

Post a Comment

Java : OutOfMemoryError

java.lang.OutOfMemoryError Exception Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no ...