30 DB2 UDB ESE V8 Performance Guide for High Performance OLTP and BI
2.2.4 Memory model
Different applications use memory in different ways. For example, some
applications may use the operating system cache for file handling, while the
database manager uses it own buffer pool for data caching. Therefore, in order to
achieve good performance, it is important to balance overall memory usage on
the system to minimize paging, as described in 5.2.2, “Memory considerations”
on page 335 and 5.3.2, “Memory considerations” on page 383. This requires a
good understanding of how DB2 organizes memory.
Memory allocation is based on database manager and database configuration
parameters. These parameters may specify hard or soft upper limits, lower
bound values, or let DB2 automatically allocate memory resources as required
via the AUTOMATIC setting. Depending upon the area of memory involved, DB2
allocates and deallocates memory at different times; some of the values of these
parameters can be changed online to take immediate effect.
Figure 2-6 on page 31 shows the different portions of memory that the database
manager allocates for various uses.
db2logts This process is used for collecting historical information about which
logs are active when a table space is modified. This information is
recorded in the DB2TSCHG.HIS file in the database directory. It is
used to speed up table space roll forward recovery.
Brief description
Chapter 2. DB2 UDB architecture overview 31
Figure 2-6 Types of memory used by DB2
There are a few special types of shared memory not shown in Figure 2-6, as
򐂰 Agent/Local Application Shared Memory (database manager configuration
parameter aslheapsz), which is attached by coordinating agents servicing
local applications. It is used for SQL request/response communications.
򐂰 UDF/Agent Shared Memory, which is attached by agents running a fenced
UDF or stored procedure. It is used as a communications area.
򐂰 Extended buffer pool, where a typically huge region (far in excess of 4 GB) of
shared memory is used as an extended buffer pool. Agents, prefetchers, and
page cleaners are not permanently attached to it. They attach to individual
segments within it as needed.
Figure 2-7 on page 32 provides a more detailed view of the main elements that
comprise each type of memory, and the database manager or database
configuration parameters associated with each type of memory.
Database Manager
Shared Memory
Application Shared Memory
Shared Memory
Shared Memory
Application Group Shared Memory
Application Shared Memory
Application Group Shared Memory
32 DB2 UDB ESE V8 Performance Guide for High Performance OLTP and BI
Figure 2-7 The memory used by the database manager
Audit buffer size
Monitor heap
Database manager shared memory (including FCM)
Log buffer
Shared sort heap
Backup buffer
Utility heap
Extended memory
Buffer pools
Lock list (locklist)
Database global memory
group heap_ratio
Application group shared memory and Application Shared memory
Agent private memory
Sort heap
Statement heap
Statistics heap
Agent stack
Application heap
Client I/O block
(rqrioblk) (remote)
Java heap
Query heap
Agent/Application shared memory
Application support
layer heap (aslheapsz)
Client I/O block
(rqrioblk) (local)
Catalog cache
Package cache

Get DB2 UDB ESE V8 non-DPF Performance Guide for High Performance OLTP and BI now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.