0% found this document useful (0 votes)
164 views

Lecture 6 DB2 Memory Model

DB2 manages memory at four levels: 1. Database Instance Memory (DIM) is used for instance-level tasks and is allocated when DB2 starts. 2. Database Global Memory (DGM) is used for backup/restore, locking, and SQL execution and is allocated when connecting to a database. 3. Application Global Memory (AGM) coordinates messages between DB2 agents and stores access plans. 4. DB2 Agent Private Memory (APM) is used by agents for tasks like building query plans and handling cursors.

Uploaded by

Elango Gopal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
164 views

Lecture 6 DB2 Memory Model

DB2 manages memory at four levels: 1. Database Instance Memory (DIM) is used for instance-level tasks and is allocated when DB2 starts. 2. Database Global Memory (DGM) is used for backup/restore, locking, and SQL execution and is allocated when connecting to a database. 3. Application Global Memory (AGM) coordinates messages between DB2 agents and stores access plans. 4. DB2 Agent Private Memory (APM) is used by agents for tasks like building query plans and handling cursors.

Uploaded by

Elango Gopal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

SECTION – 3

DB2 ARCHITECTURE
Lecture 6 DB2 MemoryModel
Contents

 Memory Model - Highlight


 DB2 Instance Memory
 DB2 Database Global Memory

 DB2 Application Global Memory

 DB2 Agent Private Memory

 Summary
DB2 Memory Model - Highlight
3

DB2 manages memory at 4 different levels


Database Instance Memory (DIM)
4

 The memory allocated for each DBMS instance is


Database Instance Memory or Instance Shared Memory

 It is used for instance level tasks such as monitoring,


auditing and inter-node communication

 It is allocated when the DB2 is started (db2start), and


freed when it is stopped (db2stop)
Database Instance Memory cont..
5

 The memory pools in Database Instance Memory are:


 The Monitor Heap (mon_heap_sz) – for monitoring
 The Audit Buffer (audit_buf_sz) – for db2audit facility and

 The FCM Buffer (fcm_num_buffers) – for partitioned systems

The Database Manager Configuration parameter INSTANCE_MEMORY controls how much


memory can be allocated to an instance
Database Global Memory (DGM)
6

 The memory allocated for each database is Database Global


Memory

 It is used for backup and restore, locking, and SQL execution.

 It is allocated when you start or initially connect to a database


and is released when you stop or disconnect.
Database Global Memory cont..
7

 Within Database Global Memory, there are a number of memory


pools.

The amount of memory that is reserved for the database global memory for a
database is determined by the DATABASE_MEMORY configuration parameter
DB2 Application Global Memory (AGM)
8

 Application Global Memory is used for:


 coordinating and sending messages between the DB2 agents that
are working on behalf of an application
 To store copies of currently executing sections of access plans

 For handling compilation of an SQL statements

In non-partitioned databases, use of


Application Global Memory is minimal.

APPL_MEMORY
DB2 Agent Private Memory (APM)
9

 Agents perform work for the applications, they are used for
such things as:
 BuildingQuery Plans
 Executing Query Plans

 Handling Cursors

 Sorting

 Gathering Statistics
Summary
10

 Database Instance Memory


 INSTANCE_MEMORY (Automatic)

 Database Global Memory


 DATABASE_MEMORY (Automatic)

 Application Global Memory


 APPL_MEMORY (Automatic)

 Agent Private Memory


 Eg: SORTHEAP , JAVA_HEAP_SZ etc
Thank You !

You might also like