Memory sets overview

The Db2® memory manager groups memory allocations from the operating system into memory sets.

The memory in a given memory set shares common attributes, such as the general purpose for which the memory is used, its expected volatility, and what, if any constraints there might be on its growth. For example, buffer pools are allocated from the database memory set, and are allocated as long as the database is active. Statement heaps are allocated from the application memory set on behalf of specific SQL preparation requests from an application, and last only as long as the statement compilation operation.

Within each memory set, specific areas of memory get assigned for purposes that are generally related to the specific memory set type. For example, certain types of database-level processing use memory from the database memory set; memory required for the fast communications manager is allocated from the FCM memory set.

Table 1 lists the different types of memory sets.
Table 1. Memory sets
Memory set type* Description Scope of memory allocated from this set
DBMS Database memory manager set. Most memory in this set is used for basic infrastructure purposes, including communication services that are not specific to a database. This memory set does not require any configuration, although user-configurable memory from this set include the monitor heap size (mon_heap_sz) and the audit buffer size (audit_buf_sz). Instance
FMP Fenced mode process memory set. Memory allocated from this set is used for communications between agents and fenced mode processes. Memory allocations from this set can be configured with the DB2_FMP_COMM_HEAPSZ registry variable and the aslheapsz configuration parameter. Instance
PRIVATE Memory allocated from this set is used for general purposes, including basic infrastructure and diagnostics support. With the exception of systems that use the private sort model, where the sheapthres configuration parameter is set to a value other than 0, the private memory set does not require any configuration. Instance
DATABASE Database memory set. Memory allocated from this set is generally used for processing that is specific to a single database, but not specific to an application. Examples of memory allocated from this set includes the buffer pools, database heap, locklist, utility heap, package cache, catalog cache, and the shared sort heap. This set can be configured through the database_memory database configuration parameter. You can also use the self-tuning memory manager (STMM) to tune this memory area. Database
APPLICATION Application memory set. Memory allocated from this set is generally used for application-specific processing. Memory allocated from this set includes application, statistics and statement heaps, and a non-configurable shared work area. This set can be configured through the appl_memory database configuration parameter. Database
FCM Fast communication manager memory set. Memory allocated from this set is used exclusively by the fast communications manager. Memory from this set can be configured with the fcm_num_buffers and the fcm_num_channels database manager configuration parameters. Host
* The names shown in the first column are the names returned for the memory_set_type monitor element.