Monday, 24 April 2017

Architecture of ORACLE


Oracle users is going to give request to server. Server will accept the request and try to knock the datafile. In order to meet the datafile, server will invokes the oracle instance. Oracle instance is a logical representation to meet up the datafiles or database. When oracle instance will started up with collection processors. It's contains two kinds of components those are
1)      Shared global area
2)       Background processors.
This two components are contained optional and mandatory. Mandatory components are taken care by oracle itself. Optional processers are taken care by DBA. It should be allocated based on the client requirement or improve the performance of a database. These decisions are completely taken care by DBA. If one process goes down, oracle instance will be down.


1) Shared global area:
              
                 SGA is a collection of memory components. Which is contained contiguous memory components to do the DML,DDL operation. Memory (RAM) shared by all the processes belonging to a single Oracle database instance. The SGA contains all information necessary for the instance operation Here we have mandatory and optional components. We will see one by one component. How it will work?

Mandatory components:

1) DBBC:
              
         Data block buffer cache is holds the information which is retrieved from datafiles. Any new insertion to database before going to commit. It will be represented in the DBBC only. Here we have dirtiy blocks and current block. Current block is most recently used block. Dirty blocks are committed transaction. Db_buffer_cache_size=2k,4k,8k,

2) Redo buffer cache:
           It is containing latest transactions which are going to write into disk as insert or update. Log_buffer_cache

3) Shared pool:
     
      Shared fool is the combination of library cache and data dictionary cache. This buffer is useful to do the internal tasks.  Shared_pool_size

4) Library cache:

                 It will allocate or de-allocate memory as SQL or Procedural code is to executed based on the individual needs of user’s sessions and in accordance of LRU cache. It holds the shared SQL areas, private SQL areas, PL/SQL procedures and packages, various control structure. It will stores the execution plan and cursors.

5) Dictionary cache: 
               highly accessed memory structures that provide information on object structures to SQL statements being parsed.

Optional components:

6) Java pool:
           memory available for the Java memory manager to use for all things Java as run state, methods, classes, session code, data in JVM.  Java_pool_size

7) Large pool: it is helpful for large memory allocation and parallel processors as shared server, oracle xA, I/o processes, backup& restore. RMAN utility large_pool_size

8) Keep pool: It is for small tables sorting purpose. Keep_pool_size

9) Recycle pool: it's allocated for large table sorting purpose. it my leads to improve the performance.

10) streams _pool: it's for providing the flexibility to do the data pump operations. Streams_pool_size. It will propagate information from with in a database or shared to others specified destinations. Asme as sharing the responsibilities.

11) result cache: it's based on three parameters  manual- need to mention operation are done here. Auto means auto allocation is provided as size. Force is the combination of both it mention values are taken as size. There is no size it will automatically allocates the memory as 64mb. It is most probably caching SQL query and PL/SQL function results to be stored in memory. RESULT_CACHE_MAX_SIZE initialization parameter. If it is 0,it is disables the server-side result cache.

Background processors:
         
      Here also we have mandatory and optional processer. This are helpful to keep the database in a synchronized manor.
  
Mandatory processor

1) Smon:  System Monitor- Max Processes-1
                                               I.            it is helpful to perform the instance recovery.
                                             II.            colasing the extents in DMTS.
                                           III.            remove the temporary segments
                                           IV.            it is perform the sanitory check. If will check all the CRD file's  SCN are matched or not.
2) PMON:  Process Monitor- Max Processes-1

  1. it is helpful Is user recovery, when the user failed to connect the database, pmon will invoke and perform the recover and available for next entry
  2. Clean up the database buffer cache. It will flashes the temporary blocks and dirty blocks and corrupted blocks.
  3. Listener tns.ora startup and registration for particular database.
3)  Dbwr: Database Writer- Max Processes-20

  1. server process is helpful to fetch the information from Database, not the dbwr
  2.  Invokes when the user gives the commit  
  3. Dirty blocks are reached  to threshold value.
  4. When dirty-blocks reaches becomes LRU blocks 
  5. when log switch occurs when checkpoint is issued.
  6. when database shuts down
  7.  undo or rollbacks happens
4)  lgwr: log writer. Max Processes-1

  1. 1/3 full of redo buffer
  2. For every 3 seconds log writer invokes. It will write the information from redo buffer to online redo’s
  3. Transactions are committed.
5) Checkpoint process:- CKPT- Max Processes-1

                Checkpoint process signals the synchronization of all database files with the checkpoint information. It ensures data consistency and faster database recovery in case of crash. When transaction are committed. DBWR wants write the information into disk then CKPT will invoke and attaché SCN number to the particular datafile and updated in the controlfile to be in the sync.
  1. When log switch occurs.
  2. When switch log occurs 
  3. When checkpoint fired
6) Recover: RECO: Max Processes-1

     Reco is helpful to resolve the distributed transaction failures due to network issues. The local reco attempts connect to the remote database and automatically complete or commit or rollback.

OPTIONAL BACKGROUND process:

1)       MMAN: memory manager is helpful to allocate the SGA memory components dynamically  by reading the pfile or spfile

2)       Trace writer; it is useful to write the latest information regarding database into trace file.

3)       DMON: dataguard monitor helpful to provide the high availability by creating the various information

4)       Arch: Max Processes-10 archival information will be provided into 10 different locations for providing the multiplexing of archival.

5)       MMON: memory monitor process helpful to gather all the statistics and writes into AWR on ascheduled based.

6)       MMNL: it is a slave process to write the AWR report

7)       RBAL: it is ASM related processer to provide the re balancing.

8)       ARBx:  The number of slaves to provide rebalancing ASM_POWER_LIMIT=11(max)

9)       ASMB: ASMB process is used to rovide information to and from the cluster synchronization services used by ASN. It is also used to update statistics and provide a heartbeat mechanism.

10)   CTWR- change track writer while used for RMAN incremental backups.

11)   Job queue monitoring

12)   I/O slaves: input and output slave to fetch the data

13)    Pnnn: parallel processer to improve the performation PARALLEL_MAX_SERVER

14)   Snnn: shared servers SHARED_SERVERS=1000(max).

15)   Dnnn: dispatcher is ready to listen the user request to provide the parallel.


0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home