Tuesday, April 04, 2006

DB2 Process Architecture

  • DB2 Process Architecture

"Architect your passion to achieve..."

The following figure shows a general overview of the architecture and processes for DB2 UDB.



Local clients communicate using

  • shared memory
  • semaphores


Rremote clients use a protocol such as

  • Named Pipes (NPIPE)
  • TCP/IP
  • NetBIOS
  • SNA

The DB2 agents perform most of the SQL processing on behalf of applications. A set of subagents might be assigned to process the client application requests. All agents and subagents are managed using a pooling algorithm that minimizes the creation and destruction of EDUs(Engine Dispatchable Units) / Agents.

Buffer pools are areas of database server memory where database pages of user table data, index data, and catalog data are temporarily moved and can be modified. Buffer pools are a key determinant of database performance because data can be accessed much faster from memory than from disk. If more of the data needed by applications is present in a buffer pool, less time is required to access the data than to find it on disk.

The configuration of the buffer pools, as well as prefetcher and page cleaner EDUs, controls how quickly data can be accessed and how readily available it is to applications.

  • Prefetchers retrieve data from disk and move it into the buffer pool before applications need the data. For example, applications needing to scan through large volumes of data would have to wait for data to be moved from disk into the buffer pool if there were no data prefetchers. Agents of the application send asynchronous read-ahead requests to a common prefetch queue. As prefetchers become available, they implement those requests by using big-block or scatter-read input operations to bring the requested pages from disk to the buffer pool. If you have multiple disks for storage of the database data, the data can be striped across the disks. Striping data lets the prefetchers use multiple disks at the same time to retrieve data.
  • Page cleaners move data from the buffer pool back out to disk. Page cleaners are background EDUs that are independent of the application agents. They look for pages from the buffer pool that are no longer needed and write the pages to disk. Page cleaners ensure that there is room in the buffer pool for the pages being retrieved by the prefetchers.

Without the independent prefetchers and the page cleaner EDUs, the application agents would have to do all of the reading and writing of data between the buffer pool and disk storage.