SECTION – 3
DB2 ARCHITECTURE
DB2 Process ModelLecture 5
Contents
 Understanding Processes & Threads
 Multithreaded Architecture in DB2
 DB2 Process Model – The Big Picture
 Client Programs & Listeners
 DB2 EDUs/Agents & Agent Pool
 Important Database EDUs
 Related DBM & DB CFG parameters
 Summary
Understanding Processes &
Threads3
 A process is an executing instance of an application. It
can contain multiple threads. A thread could be
considered as a light-weight version of a process
 Thus, the essential difference between a thread and a
process is the work that each one is used to accomplish.
Threads are used for small tasks, whereas processes
are used for more ‘heavyweight’ tasks – basically the
execution of applications.
Multithreaded Architecture in
DB24
There are many advantages to using a multithreaded
architecture
for DB2 data server:
- A new thread requires less memory and fewer operating
system resources than a process
- The context switch time for threads is less than that for
processes
DB2 Process Model - The Big
Picture5
Listing All
EDUS
db2pd -edus
Client Programs & Listeners
 Client programs can be
remote or local, running on
the same machine as the
database server. Client
programs make first contact
with a database through a
communication listener.
 Communication listeners start
when the DB2 database server
starts. There is a listener for each
configured communication
protocol
 db2ipccm (IPC – local clients)
 db2tcpcm (tcpip – remote
clients)
 db2npcm (npipe protocol -
6
Client Programs Communication Listeners
EDUs / Agents
7
An agent can be thought of as a 'worker' that performs all
Database operations on behalf of an application. There are
three
types of DB2 agents:
 Idle agents – db2agent (idle)
 Active Coordinator Agent - db2agent (db_name)
 Subagent - db2agntp
Database EDUs
8
The following list includes some of the important EDUs that
are used
by each database:
 db2dlock : for deadlock detections
 db2loggw : log file writer
 db2pfchr : buffer pool prefetchers
 db2pclnr : buffer pool page cleaners
Database Server threads and
processes
9
 The system controller (db2sysc on UNIX
and db2syscs.exe on Windows operating systems) must
exist if the database server is to function.
 db2sysc, the main system controller EDU; it handles critical
DB2 server events
 db2licc, manages installed DB2 licenses
Related DBM & DB CFG parameters
10
 DBM CFG
 NUM_POOLAGENTS : Agent pool size (max)
 NUM_INITAGENTS : Initial number of agents in pool
 MAX_CONNECTIONS: maximum number of application connections
 MAX_COORDAGENTS : Max number of coordinating agents
 DB CFG
 NUM_IOCLEANERS : The number of page cleaners per database
 NUM_IOSERVERS : The number of prefetchers per database
Summary
11
 DB2 has a multithreaded architecture (Processes & EDUs)
 Process Model (db2pd –edus)
 Listeners (db2tcpcm & db2ipccm)
 3 types of agents (idle, coordinator agents, sub-agents)
 Agent Pool
 Database EDUs (prefetchers, page cleaners, log readers/writers etc)
 db2syscs.exe
 DBM & DB cfg related parameters
Looking for a full-fledged course on DB2?
A fresh new course coming up on Udemy.com
IBM DB2 9 – SQL & Database Administration Workshop
 Over 180+ video lectures
 Quizzes & exercises
 DB2 Detective Game
 IBM DB2 Certification Preparation
and much more..
Care for a pre-launch notification and a discount coupon?
Write to me at aady4u@gmail.com
Thank You !

S3 l5 db2 - process model

  • 1.
    SECTION – 3 DB2ARCHITECTURE DB2 Process ModelLecture 5
  • 2.
    Contents  Understanding Processes& Threads  Multithreaded Architecture in DB2  DB2 Process Model – The Big Picture  Client Programs & Listeners  DB2 EDUs/Agents & Agent Pool  Important Database EDUs  Related DBM & DB CFG parameters  Summary
  • 3.
    Understanding Processes & Threads3 A process is an executing instance of an application. It can contain multiple threads. A thread could be considered as a light-weight version of a process  Thus, the essential difference between a thread and a process is the work that each one is used to accomplish. Threads are used for small tasks, whereas processes are used for more ‘heavyweight’ tasks – basically the execution of applications.
  • 4.
    Multithreaded Architecture in DB24 Thereare many advantages to using a multithreaded architecture for DB2 data server: - A new thread requires less memory and fewer operating system resources than a process - The context switch time for threads is less than that for processes
  • 5.
    DB2 Process Model- The Big Picture5 Listing All EDUS db2pd -edus
  • 6.
    Client Programs &Listeners  Client programs can be remote or local, running on the same machine as the database server. Client programs make first contact with a database through a communication listener.  Communication listeners start when the DB2 database server starts. There is a listener for each configured communication protocol  db2ipccm (IPC – local clients)  db2tcpcm (tcpip – remote clients)  db2npcm (npipe protocol - 6 Client Programs Communication Listeners
  • 7.
    EDUs / Agents 7 Anagent can be thought of as a 'worker' that performs all Database operations on behalf of an application. There are three types of DB2 agents:  Idle agents – db2agent (idle)  Active Coordinator Agent - db2agent (db_name)  Subagent - db2agntp
  • 8.
    Database EDUs 8 The followinglist includes some of the important EDUs that are used by each database:  db2dlock : for deadlock detections  db2loggw : log file writer  db2pfchr : buffer pool prefetchers  db2pclnr : buffer pool page cleaners
  • 9.
    Database Server threadsand processes 9  The system controller (db2sysc on UNIX and db2syscs.exe on Windows operating systems) must exist if the database server is to function.  db2sysc, the main system controller EDU; it handles critical DB2 server events  db2licc, manages installed DB2 licenses
  • 10.
    Related DBM &DB CFG parameters 10  DBM CFG  NUM_POOLAGENTS : Agent pool size (max)  NUM_INITAGENTS : Initial number of agents in pool  MAX_CONNECTIONS: maximum number of application connections  MAX_COORDAGENTS : Max number of coordinating agents  DB CFG  NUM_IOCLEANERS : The number of page cleaners per database  NUM_IOSERVERS : The number of prefetchers per database
  • 11.
    Summary 11  DB2 hasa multithreaded architecture (Processes & EDUs)  Process Model (db2pd –edus)  Listeners (db2tcpcm & db2ipccm)  3 types of agents (idle, coordinator agents, sub-agents)  Agent Pool  Database EDUs (prefetchers, page cleaners, log readers/writers etc)  db2syscs.exe  DBM & DB cfg related parameters
  • 12.
    Looking for afull-fledged course on DB2? A fresh new course coming up on Udemy.com IBM DB2 9 – SQL & Database Administration Workshop  Over 180+ video lectures  Quizzes & exercises  DB2 Detective Game  IBM DB2 Certification Preparation and much more.. Care for a pre-launch notification and a discount coupon? Write to me at aady4u@gmail.com
  • 13.