Friday, December 25, 2009

DB2 Architecture



[ Team LiB ]





DB2 Architecture


DB2 uses semaphores and shared memory for interprocess communication. This has enabled DB2 to be the first Relational Database Management System (RDBMS) to support the new InfiniBand storage architecture.


The DB2 Process Model (Figure 2.3) consists of clients or applications connecting to DB2 databases where a coordinating agent is assigned to process all requests for a particular application. Subagents can be assigned if using the ESE Database Partitioning Feature (DPF) or intrapartition parallelism. Bufferpools are used to store frequently accessed data and I/O servers process prefetch requests. I/O cleaners flush dirty pages from the bufferpools to disk. The logger process records changed information and at the appropriate time writes committed changes to disk in coordination with the bufferpool manager.


Figure 2.3. Overview of DB2 architecture.


Communication protocols supported are TCP/IP (the most common), NETBIOS, Named Pipes, and APPC. Work in DB2 is accomplished by Engine Dispatchable Units (EDUs). In UNIX, EDUs are implemented as processes and in Windows, EDUs are implemented as threads. The ps (process status) command can be used on UNIX to display DB2 processes. Use the db2_local_ps command to return a list of all DB2 processes to standard output. Operating system processes will not be shown; only DB2 processes will be shown, which makes it easier to quickly see what DB2 processes are running. On Windows, DB2 threads can be monitored using the TASK MANAGER. See Table 2.3 for a partial list of DB2 processes on UNIX platforms. (For a detailed list, refer to the "Everything You Wanted to Know About DB2 VDB Processes," DB2 Developer Domain tech article by Snow and R. Chung).


Table 2.3. DB2 AIX Processes

Process Name

Function

db2agent

Coordinator agent

db2agentp

Subagent processes

db2pfchr

Prefetching

db2pclnr

Page cleaning

db2loggr

Log reader

db2loggw

Log writer

db2logts

Tablespace logger

db2glock and db2dlock

Global and local deadlock detector, one per partition

db2fmp

Fenced process for UDFs and SPs

db2reorg

Online inplace reorg process

db2sysc

DB2 engine

db2tcpcm

TCP communication manager

db2ipccm

IPC communication manager


Coordinating Agent (db2agent)


DB2 assigns a coordinating agent for each connected application. Coordinating agents coordinate the work associated with an application. Coordinating agents create subagents in a partitioned database environment or if intraparallel is enabled, as well as the work of subagents.


Subagents (db2agntp)


Subagents are created by coordinating agents to do work in parallel. Subagents are used in partitioned database environments or if the intra_parallel DBM CFG parameter is enabled.





    [ Team LiB ]



    No comments: