This is the basic concept about Oracle and this is the back born of Oracle DB. An Oracle database is a combination of oracle Instance and data files on the file system.
Database Buffer Cache This is used to hold the data into the memory. When
ever a user access the data, it gets fetched into database buffer cache and it will be managed according to LRU (Least recently used) algorithm. Advantages If a user is requesting data, which gets fetched into the buffer cache, then next time if he ask for same data with in a short period of time, the data will be read from buffer cache and Oracle process does not have to fetch data again from disk. Reading data from buffer cache is a faster operation. Another advantage is that if a user is modifying the data, it can be modified in the buffer cache which is a faster operation then modifying the data directly on the disk.
Redo Log Buffer - This memory block hold the data which is going to be written to
redo log file. Why do we need this data? To rollback the changes if the need be. But instead of writing the data directly to the redo log files, it is first written to log buffer
which improves performance and then with the occurrence of certain event it will be written to redo log file.
Large Pool - If defined then used for heavy operations such as bulk copy during
backup or during restore operation. The total size of SGA is determined by a parameter SGA_MAX_SIZE. Below is the simple calculation of memory sizes. SQL> show sga Total System Global Area 577574308 bytes Fixed Size 452004 bytes Variable Size 402653184 bytes Database Buffers 163840000 bytes Redo Buffers 10629120 bytes This will show fixed and variable size SGA. Fixed size SGA, as I said is not in our control. However we can verify the size of variable SGA and other memory values shown above. Database Buffers 163840000 bytes SQL> show parameters db_block_buffer NAME TYPE VALUE db_block_buffers integer 20000 This value is in terms of blocks. we can find the size of a block using DB_BLOCK_SIZE parameter SQL> show parameters db_block_size NAME TYPE VALUE db_block_size integer 8192 So Database Buffers = db_block_buffers X db_block_size = 20000 X 8192 = 163840000 bytes Also Variable size = Shared Pool Size + Large Pool Size + Java Pool size (some times defined) SQL> SELECT pool, sum(bytes) from v$sgastat group by pool; POOL SUM(BYTES) java pool 50331648 shared pool 352321536 11069860 Variable size = 352321536 + 50331648 = 402653184 bytes
3. Recycle Cache If we define the cache size using DB_CACHE_SIZE (or DB_BLOCK_BUFFER and specify the block size) then this will be default cache. The cache has a limited size, so not all the data on disk can fit in the cache. When the cache is full, subsequent cache misses cause Oracle to write dirty data already in the cache to disk to make room for the new data. You can configure the database buffer cache with separate buffer pools that either keep data in the buffer cache or make the buffers available for new data immediately after using the data blocks. The KEEP buffer pool retains the schema objects data blocks in memory. This is defined using the INIT.ORA parameter DB_KEEP_CACHE_SIZE The RECYCLE buffer pool eliminates data blocks from memory as soon as they are no longer needed. This is defined using the INIT.ORA parameter DB_RECYCLE_CACHE_SIZE You can also define multiple DB block sizes using following parameters. Example if you have defined standard default block size of 4K, then following parameters can be used to define a size of 2K, 8K, 16K and 32K. DB_2K_CACHE_SIZE DB_8K_CACHE_SIZE DB_16K_CACHE_SIZE DB_32K_CACHE_SIZE Note that you can define the Keep and Recycle cache only on standard block size and buffer cache size is the sum of sizes of each of these pools.
Database writer (DBWn) - The database writer process (DBWn) writes the
contents of buffers to datafiles. The DBWn processes are responsible for writing modified (dirty) buffers in the database buffer cache to disk. Although one database writer process (DBW0) is adequate for most systems, you can configure additional processes (DBW1 through DBW9) to improve write performance if your system modifies data heavily. These additional DBWn processes are not useful on uniprocessor systems. Log Writer (LGWR) The log writer process (LGWR) is responsible for redo log buffer managementwriting the redo log buffer to a redo log file on disk. LGWR writes all redo entries that have been copied into the buffer since the last time it wrote.
Checkpoint (CKPT) - When a checkpoint occurs, Oracle must update the headers
of all datafiles to record the details of the checkpoint. This is done by the CKPT process. The CKPT process does not write blocks to disk; DBWn always performs that work.
Process Monitor (PMON) The process monitor (PMON) performs process recovery when a user process fails. PMON is responsible for cleaning up the database buffer cache and freeing resources that the user process was using. For example, it resets the status of the active transaction table, releases locks, and removes the process ID from the list of active processes. PMON periodically checks the status of dispatcher and server processes, and restarts any that have died (but not any that Oracle has terminated intentionally). PMON also registers information about the instance and dispatcher processes with the network listener.
Archiver Process (ARCn) The archiver process (ARCn) copies online redo log files to a designated storage device after a log switch has occurred. ARCn processes are present only when the database is in ARCHIVELOG mode, and automatic archiving is enabled. An Oracle instance can have up to 10 ARCn processes (ARC0 to ARC9). The LGWR process starts a new ARCn process whenever the current number of ARCn processes
is insufficient to handle the workload. The ALERT file keeps a record of when LGWR starts a new ARCnprocess.