Memory Architecture   «Prev  Next»

Lesson 1

Understanding Oracle's Memory Architecture

Now that you know about files and processes, it is time to learn about the last piece of the architecture puzzle, which is memory.
Oracle uses several memory structures: the
  1. System Global Area,
  2. Program Global Areas,
  3. and Sort Areas.
See Figure 1 below

Evolution of Oracle's Memory Architecture

Oracle's Memory Architecture has evolved since the earlier versions. While the System Global Area (SGA) is a persistent component, Program Global Areas (PGA) and Sort Areas have been replaced by more granular memory structures.
The current Oracle Memory Architecture consists of the following main components:
  1. System Global Area (SGA): Shared memory region used by all sessions and background processes. It includes various sub-components such as shared pools, buffer cache, redo log buffer, and control structures.
  2. Process-Specific Memory Areas (PSMAs): Each session and background process has its own Process-Specific Memory Area. This includes the Private SQL Area (which holds parse trees, execution plans, and session-specific data), User Global Area (UGA), stack space, and other session-specific buffers and caches.
  3. Oracle Database Buffer Cache (DB Cache): Stores frequently accessed data blocks in memory to improve performance. It is managed by the Buffer Manager Background Process (BMP).
  4. Redo Log Buffer: Stores redo entries in memory before they are written to the redo log files. It is managed by the Log Writer (LGWR) Background Process.
  5. Java Pool: Allocates and manages memory for Java Virtual Machine (JVM). It is used by Oracle JVM-based products, such as Oracle Database and Oracle WebLogic Server.
  6. Shared Memory Structures: Various shared memory structures are used for communication and coordination between Oracle processes, such as the shared hash table, enqueue structures, and latch structures.
  7. Memory Targets: Oracle provides automatic memory management through Memory Targets. It includes various target parameters that allow database administrators to specify the desired memory allocation for different components.
It's worth noting that Oracle's Memory Architecture may vary slightly depending on the specific Oracle version and configuration.



Oracle Database Memory Structures
Figure 1: Oracle Database Memory Structures consisting of 1) Server Processes and 2) Background Process interacting with the System Global Area

Understanding and properly sizing the System Global Area, Program Global Areas, and Sort Areas can have big impact on overall database performance.
The System Global Area is the most significant structure, and the most important to understand. You've already seen, in the previous module, that it's divided into several smaller areas known as the database buffer cache, the redo log buffer, and the shared pool. This module goes into more detail about each of those structures, particularly the shared pool.
When you are done with this module, you should be able to:
  1. Describe the memory structures that make up the SGA
  2. Describe how the database buffer cache manages data blocks
  3. Describe the purpose of the three types of buffer pools
  4. Describe the function of the redo log buffer.
  5. Identify the function of the large pool
  6. Describe how each session gets its own memory
  7. List the contents of the PGA
  8. Describe how Oracle uses memory for sorting
The knowledge that you gain in this lesson will enable you to understand many of the tuning issues that will arise when you manage an Oracle database.

SEMrush Software