Today, we will explain the Oracle 11g architecture. It is basically divided into the following three major parts:

  1. Memory Structure
  2. Logical Database Structure
  3. Physical Structure

The memory structure of the 11g architecture means segregation of logical memory for various processes of Oracle. Whenever the Oracle instance is started it acquires the memory set for it via the MEMORY_TARGET and MEMORY_MAX_TARGET parameters (Automatic Memory Management must be enabled for this during installation) through the Oracle Universal Installer (OUI), a Java API for Oracle DB installs. With no further ado, let's focus on the memory structure.

The Oracle Memory Structure is primarily allocated into the two parts:

  1. System Global Area (SGA)
  2. Program Global Area (PGA)



Memory

Let's explain the SGA first.

The SGA or System Global Area is the most vital of them. It is manually managed by "SGA_TARGET" parameters. The SGA itself is further sectioned into the following:

  1. Shared Pool: SHARED_POOL_SIZE
  2. Data Buffer Cache: DB_CACHE_SIZE
  3. Redo Log Buffer: LOG_BUFFER
  4. Large Pool: LARGE_POOL_SIZE
  5. Java Pool: JAVA_POOL_SIZE
  6. Streams Pool: STREAMS_POOL_SIZE
  7. Sort Extent Pool
  8. Flash Back Buffer

SGA

The following explains the preceding topics in detail.

1. SHARED POOL

A Shared Pool is a very vital part of SGA and its configuration is what makes the response on the Oracle DB quick, prevents unnecessary I/O Hits and CPU utilization. The Shared Pool itself consists of the following:

2. DATA BUFFER CACHE

The Data Buffer Cache, as the name suggests, holds the data read by the server process from the data files. If the data is not present in the Data Buffer Cache and the response time is increased for it then it will first read the data into buffer cache then display it. Thus, the larger the buffer cache, the fewer the disk reads and writes are needed and the better the performance of the database. There can be a free buffer area and dirty buffer area that is the data under manipulation and the pinned data that is currently in use by the active buffer. Further this buffer cache uses a complex combination of algorithms like LRU and Touch count. Also we can create multiple Data Buffer Caches and use the ALTER TABLE or ALTER INDEX command to modify the type of buffer pool that a table or an index should use. DB_CACHE_SIZE is the parameter to set the Data Buffer size. The keep and the recycle buffer pools are purely optional, while the default buffer pool is mandatory. DB_KEEP_CACHE_SIZE helps to maintain the data blocks in memory. We may have small tables that are frequently accessed, so we can assign the tables to the keep buffer cache when they are created.

DB_RECYCLE_CACHE_SIZE: It helps to remove the data from the cache immediately after use. It will cycle out the object from the cache as soon as the transaction is over. This is ideal for large tables where transactions are not constant.

3. REDO LOG BUFFER

It is set by the LOG_BUFFER initialization parameter and it's a circular buffer in SGA. The size of the Redo log buffer is just a couple of MBs and if it's once fixed then it cannot be dynamically resized like other parameters. The Log writer flushes the redo log to the disk for the following circumstances:

4. LARGE POOL

It is an optional memory pool, it's useful only:

The size of the Large pool is set by the LARGE_POOL_SIZE parameter.

5. Java POOL

This memory space is configured for the database using Java code. This segregation helps to provide a definitive space for a Java app to run without affecting other functionality. It has reserved memory for the Java Virtual Machine (JVM).

6. THE STREAMS POOL

The STREAMS_POOL_SIZE initialization parameter helps set the stream pool component. It is useful for data sharing among various databases and various applications. If the automatic shared memory management option is enabled then the space allocated is almost 10 percent of the shared pool size.

7. SORT EXTEND POOL

In a shared server scenario the sort extent pool is used to direct the extent of Sort segments within the temporary tables pace as may be requested by the user process. In a dedicated server scenario the sort extent pool resides in the PGA. V$SORT_SEGMENT contains the information about the sort extent pool that may help us decide to size our extent properly.

8. FLASH BACK POOL

A Flash Back Buffer is used for the following purposes: