The MON_GET_MEMORY_SET table function retrieves metrics from the allocated memory sets, both at the instance level, and for all active databases within the instance.
>>-MON_GET_MEMORY_SET--(--memory_set_type--,--db_name--,--member--)-><
The schema is SYSPROC.
Value | Scope | Description |
---|---|---|
DBMS | Instance | DB2® database manager (DBM) memory set |
FMP | Instance | Fenced mode process (FMP) memory set |
PRIVATE | Instance | Private memory set |
DATABASE | Database | Database memory set |
APPLICATION | Database | Application memory set |
FCM | Host - there is only one FCM memory set allocated per machine for an instance. | Fast communication manager (FCM) memory set |
NULL | All | All memory sets at the instance and database level |
EXECUTE privilege on the MON_GET_MEMORY_SET function.
Example 1: Retrieve memory set metrics for the current instance and the currently connected database.
SELECT varchar(memory_set_type, 20) as set_type,
varchar(db_name, 20) as dbname,
memory_set_used,
memory_set_used_hwm
FROM TABLE(
MON_GET_MEMORY_SET(NULL, CURRENT_SERVER, -2))
An example of output from this query.
SET_TYPE DBNAME MEMORY_SET_USED MEMORY_SET_USED_HWM
------------ ---------------- --------------- -------------------
DBMS - 86080 87360
FMP - 0 704
PRIVATE - 10624 16256
DATABASE TESTDB 928000 928000
APPLICATION TESTDB 1472 2752
5 record(s) selected
In a partitioned database environment, the fast communication manager (FCM) memory set is allocated per host; all members on this host machine share this set. The MON_GET_MEMORY_SET function retrieves data from each member. Since the FCM memory set is shared among all members on the host, the metrics reported for FCM memory for each member on the host represent information about the same shared memory set. For this reason, when examining metrics for FCM memory, examine the data for each unique host. For hosts with multiple members, use data from only one member on that host, as the metrics for FCM memory represent the aggregated total for all members on the given host.
Column name | Data type | Description |
---|---|---|
MEMBER | SMALLINT | member - Database member |
HOST_NAME | VARCHAR(255) | host_name - Host name |
DB_NAME | VARCHAR(128) | db_name - Database name |
MEMORY_SET_TYPE | VARCHAR(32) | memory_set_type - Memory set type. See the memory_set_type input parameter for the list of possible types. |
MEMORY_SET_ID | BIGINT | memory_set_id - Memory set identifier. |
MEMORY_SET_SIZE | BIGINT | memory_set_size - Memory set size. The value is in KB. |
MEMORY_SET_COMMITTED | BIGINT | memory_set_committed - Memory currently committed. The value is in KB. |
MEMORY_SET_USED | BIGINT | memory_set_used - Memory in use by this set. The value is in KB. |
MEMORY_SET_USED_HWM | BIGINT | memory_set_used_hwm - Memory set high water mark. The value is in KB. |