This chapter discusses the memory architecture of an Oracle Database instance. It contains the following topics:
See Also:
Oracle Database Administrator's Guide for instructions for configuring and managing memoryIntroduction to Oracle Database Memory Structures
- Program code
- Information about a connected session, even if it is not currently active
- Information needed during program execution (for example, the current state of a query from which rows are being fetched)
- Information that is shared and communicated among Oracle Database processes (for example, locking information)
- Cached data (for example, data blocks and redo log entries) that is also permanently stored on storage devices
Basic Memory Structures
The basic memory structures associated with Oracle Database include:
- Software code areasSoftware code areas are portions of memory used to store code that is being run or can be run. Oracle Database code is stored in a software area that is typically at a different location from users' programs—a more exclusive or protected location.
- System global area (SGA)The SGA is a group of shared memory structures, known as SGA components, that contain data and control information for one Oracle Database instance. The SGA is shared by all server and background processes. Examples of data stored in the SGA include cached data blocks and shared SQL areas.
- Program global area (PGA)A PGA is a memory region that contains data and control information for a server process. It is nonshared memory created by Oracle Database when a server process is started. Access to the PGA is exclusive to the server process. There is one PGA for each server process. Background processes also allocate their own PGAs. The total memory used by all individual PGAs is known as the total instance PGA memory, and the collection of individual PGAs is referred to as the total instance PGA, or just instance PGA. You use database initialization parameters to set the size of the instance PGA, not individual PGAs.
Figure 8-1 illustrates the relationships among these memory structures.
Overview of the System Global Area
The System Global Area (SGA) and the set of database processes constitute an Oracle Database instance. Oracle Database 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 database background processes and all server processes that execute on behalf of users can read information contained within the instance's SGA, and several processes write to the SGA during database operation.
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.
As shown in Figure 8-1, the SGA consists of a number of memory components, which are pools of memory used to satisfy a particular class of memory allocation requests.
See Also:
- "Introduction to an Oracle Instance" for more information about an Oracle Database instance
Database Buffer Cache
The database buffer cache is the portion of the SGA that holds copies of data blocks read from datafiles. All users concurrently connected to the instance share access to the database buffer cache.
This section includes the following topics:
-
Credit goes to the below website(s) :
No comments:
Post a Comment