IBM Support

[Db2] Only on V11.1m4fp4 and V11.5fp0: PRIVATE memory could leak on Windows environment.

Troubleshooting


Problem

PRIVATE memory could leak in case a database manager (db2syscs.exe) is running in Db2 V11.1m4fp4 or V11.5fp0 on Windows.
As a result of this memory leak, the following symptoms might be reported:
  • Application performance degrades since it cannot allocate memory for DATABASE MEMORY.
  • Database activation fails due to memory shortage.
  • Connections to a database fail or take long time due to memory shortage.
  • SQLs might return various memory shortage-related errors, such as SQL0973N, SQL0101N, SQL0954N are returned.

Symptom

In db2pd -dbptnmem command output, we can see increase in PRIVATE memory set.
Then, if we run "db2pd -memblock private sort", we can see that most part of the PRIVATE set are consumed by LOC or FILE memory blocks.
All memory consumers in Private memory set:
PoolAddr           PoolID  PoolName  SecondID TotalSize(Bytes)  %Bytes TotalCount %Count  LOC  File
0x000001504C280498 86      persist   0        7663597408        99.87  216388     99.43   476  4284367586
NOTE: A heavy use of db2pd -memblock command puts a high system load, and could cause another memory leak.

Cause

Due to code changes introduced in Db2 v11.1m4fp4, a few memory blocks came not to be freed correctly at a cleanup of EDUs (threads inside db2syscs.exe process).  It causes a memory leak especially at every database deactivation.

Environment

Db2 V11.1m4fp4 or V11.5fp0 on Windows

Resolving The Problem

This problem is reported as the following APARs, and fixed in v11.1m4fp5 and v11.5m4fp0.
Apply the fix packs or higher to avoid the problem.
IT28248 IT30794: CLEANING UP OF EDU CAUSES PRIVATE MEMORY TO LEAK (WINDOWS PLATFORM ONLY)
If you cannot apply a fix pack for now, consider to explicitly activate databases (with activate database command) to relax the occurrence of this memory leak issue.
Ex)
  1. Log on to the database server as an administrator, and launch "Db2 Command WIndow - Administrator".
  2. Run the following command. ("activate db" command needs to be run against each database used on the environment.)
    db2 activate db <db_name>
These steps must be run each time the Db2 instance is restarted.
Note that the database activation can relax the memory leak, but the leak itself still occurs during LOAD, BACKUP DATABASE or starting up and terminating db2agents whose number exceeds NUM_POOLAGENTS.  Only applying the fix pack can completely resolve this issue.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m0z000000GozAAAS","label":"Memory"}],"ARM Case Number":"","Platform":[{"code":"PF033","label":"Windows"}],"Version":"11.1.0;11.5.0"}]

Document Information

Modified date:
10 June 2021

UID

ibm16462549