Monday, June 15, 2020

Memory Architecture

Hey Folks,

Here we shall know very little and important Facts about memory architecture.

When we talk about memory architecture of an ORACLE then it comes in our mind that the memory architecture is SGA (Shared Global Area) and PGA (Program Global Area) and  it comes Collectively in Memory architecture of an ORACLE.  

Here we shall know about  the what kind of information hold by the memory architecture in an ORACLE.

Oracle uses  memory to store information at run time and such is fallowing.

  • Program Code
  • Information about a connected session even if it is not currently active
  • Information About the program during the program Execution.  For e.g.,  the current state of a query from which rows are bring fetched.
  • Information that is shared and communicated among oracle processes. For e.g.  Locking Information.
  • Cached data that is also permanently stored on peripheral memory . For e.g. Data Block and redo Log Entries.
The Basic memory structures associated with oracle is :
  • System Global Area (SGA) : Which is Shared by all server and background processes.
  • Program Global Area (PGA) : Which is private to each server and background Process and there  is one PGA for an each processes.

System Global Area (SGA) :

A system global area  (SGA) is a group of shared memory architecture that contain data and control information  for one Oracle Database  Instance.

If  Multiple Users are concurrently connected to the same instance's SGA is shared among the users.

Memory allocations happens to the SGA from the RAM memory of the systems or Servers. When instance starts the SGA reserves memory from the RAM. When Instance Shut down then SGA allocated memory released automatically.

An SGA and oracle process collectively make up an oracle instance. Oracle Automatically allocates memory for an SGA when you start an instance, and the operating system reclaims the memory when you shutdown  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 an Oracle.

Program Global Area (PGA) :

A program Global area (PGA) is a memory region  that contain data and control information for a server process. 

When a user makes a request to connect with an instance then the server process start to communicate to instance on behalf of user process and for that server process PGA memory allocated. PGA allocates for each and every server process separately. PGA memory also allocates from the system/Servers RAM  memory.  

When Session is started then memory reserves for that session from the RAM and when the session is closed then memory is released itself for that particular session.

It is non shared memory created by Oracle when server process is started.  Only a Server process can  access the PGA. Memory Allocated for PGA  that is memory allocated from outside the Oracle Instance Memory.

Oracle Database Reads and Writes  information in the PGA on the behalf of the server process. One PGA exists for each server processes and each background processes. It Stores data and control information for a single server Process or a Single background process.


Thank You !!.

Please keep visiting this blog for more informative posts. 

No comments:

Post a Comment