DB2 - Problem description
Problem IC70802 | Status: Closed |
MEMORY LEAK IN DATABASE HEAP ON HADR STANDBY DATABASE EACH TIME A NEW LOG FILE IS CREATED. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
A memory leak occurs in Database Heap on HADR standby database. This memory leak happens at a data structure used by log file management on standby database. This data structure is allocated when a new log file is created. But, it is not freed after using. Fortunately, this data structure will be reused if its corresponding log file is reused. So, this memory leak can be triggered by LOGARCHMETH1 = LOGRETAIN, since log files will not be reused. Database Heap memory usage can be monitored by one of the following methods: - db2pd -db <database> -mempools (monitor the "dbh" pool) - database snapshot - select POOL_ID, POOL_CUR_SIZE, POOL_WATERMARK from sysibmadm.snapdb_memory_pool where POOL_ID = 'DATABASE' If this memory leak exists, you can observe a memory usage increase by 2096 bytes for every new log file. You can use db2pd to monitor memory usage of this data structure. db2pd -d <standby db name> -memb sort 2 Here is a sample output: ======================== Memory blocks sorted by size for dbh pool: PoolID PoolName TotalSize(Bytes) TotalCount LOC File ...... 2 dbh 16768 8 74 418710486 Please note that the file 418710486 is your target to monitor. "TotalCount" means how many data structures allocated, and still not released. "TotalSize(Bytes)" means how many bytes occupied by this data structure. You can see that "TotalSize(Bytes) / TotalCount = 2096" and both of them keep rising along with new log files being created. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL. * **************************************************************** * PROBLEM DESCRIPTION: * * A memory leak occurs in Database Heap on HADR * * standbydatabase.This memory leak happens at a data structure * * used by logfile management on standby database. This data * * structure isallocated when a new log file is created. But, * * it is notfreed after using. Fortunately, this data structure * * will bereused if its corresponding log file is reused.So, * * this memory leak can be triggered byLOGARCHMETH1=LOGRETAIN, * * since log files will not be reused.Database Heap memory * * usage can be monitored by one of thefollowing methods:- * * db2pd -db <database> -mempools (monitor the "dbh" pool)- * * database snapshot- select POOL_ID, POOL_CUR_SIZE, * * POOL_WATERMARK fromsysibmadm.snapdb_memory_pool where * * POOL_ID = 'DATABASE'If this memory leak exists, you can * * observe a memory usageincrease by 2096 bytes for every new * * log file. You can usedb2pd to monitor memory usage of this * * data structure.db2pd -d <standby db name> -memb sort 2Here * * is a sample output:========================Memory blocks * * sorted by size for dbh pool:PoolID PoolName * * TotalSize(Bytes) TotalCount LOC File......2 dbh * * 16768 8 74 418710486Please note that * * the file 418710486 is your target tomonitor."TotalCount" * * means how many data structures allocated, andstill not * * released."TotalSize(Bytes)" means how many bytes occupied by * * thisdata structure.You can see that "TotalSize(Bytes) / * * TotalCount = 2096" andboth of them keep rising along with * * new log files beingcreated. * **************************************************************** * RECOMMENDATION: * * Update to v95fp7 or later. * **************************************************************** | |
Local Fix: | |
Set log archive method to other methods, instead of LOGRETAIN. Alternatively, if you have chance to restart your standby database, the memory will be freed. | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows | |
Solution | |
This problem is first fixed in version 9.5 fixpack 7. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 26.08.2010 25.10.2010 25.10.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP7 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.1.0.7 | |
9.5.0.7 |