IBM Support

How to calculate the number of db2fmp processes allowed using the DB2_FMP_COMM_HEAPSZ variable

Troubleshooting


Problem

If a large number of fenced routines are being executed on a given instance, it is possible that the limit of db2fmp processes may be reached. This article outlines how to calculate how many db2fmp processes are allowed based on the current DB2_FMP_COMM_HEAPSZ variable setting.

Symptom

If you are reaching the FMP communication heap limit, you may see messages similar to the following in the db2diag.log

EDUID : 51965 EDUNAME: db2agent (DATABASE) 0
FUNCTION: DB2 UDB, SQO Memory Management, sqloMemLogPoolConditions, probe:30
DATA #1 : <preformatted>
Out of memory failure for Undefined Heap on node 0.
Requested block size : 122900 bytes.
Physical heap size : 268304384 bytes.
Configured heap size : 23003136 bytes.
Unreserved memory used by heap : 0 bytes.
Unreserved memory left in set : 0 bytes.

LEVEL: Error
EDUID : 57514 EDUNAME: db2agent (DATABASE) 0
FUNCTION: DB2 UDB, routine_infrastructure, sqlerGetFMPIPC, probe:50
MESSAGE : Insufficient memory available for IPC communication with the db2fmp
process. Use the DB2_FMP_COMM_HEAPSZ registry variable to adjust the
amount of memory available for fenced routines.
DATA #1 : Hexdump, 4 bytes
0x0700000047FF6540 : 8B0F 003B ...;

Environment


Diagnosing The Problem

To determine the current value of each setting, please run the following commands:

1) To determine the current value of DB2_FMP_COMM_HEAPSZ (4K pages), issue the following command:
db2set -all

2) To determine the current value of ASLHEAPSZ (4K pages), issue the following command:
db2 get dbm cfg

3) To determine the current number of db2fmp processes and threads, use the following command:
db2pd -fmp

Within the output, each db2fmp process will have a heading such as follows:

FMP Process:
Address FmpPid Bit Flags ActiveThrd PooledThrd ForcedThrd Active IPCList
0x0780000000D92A40 201132 64 0x00000003 10 5 0 Yes 0x078000000193BD60

For each heading entitled "FMP Process:", there is 1 db2fmp process + ActiveThrd + PooledThrd +ForcedThrd. In this specific example, there is 1 + 10 + 5 + 0 = 16 (process + threads) that count against the DB2_FMP_COMM_HEAPSZ value. Repeat this process for each FMP process to obtain a total

The basic calculation for DB2_FMP_COMM_HEAPSZ is as follows:

DB2_FMP_COMM_HEAPSZ / (2 * ASLHEAPSZ) = # db2fmp processes + # db2fmp threads

Please note, there is a chance that setting DB2_FMP_COMM_HEAPSZ to a value lower than 256Mb on Unix operating systems will not take affect and will still be able to grow to 256Mb. This has been corrected by the following APARs:
IT05148 - DB2 9.7 Fixpack 11


IT05205 - DB2 10.1 Fixpack 5
IT05206 - DB2 10.5 Fixpack 7


Below are common example calculations:

- DB2 LUW v9.5 on AIX, DB2_FMP_COMM_HEAPSZ is not set (default 256M), ASLHEAPSZ=15 (default)

256M / (2 * 15 * 4K) = # db2fmp processes + # db2fmp threads
(268435456 bytes) / (2 * 15 * 4096 bytes) = 2184.53

In this particular case, the current setting should be able to accommodate approximately 2184 db2fmp processes and threads combined.

- DB2 LUW v9.5 on non-AIX, DB2_FMP_COMM_HEAPSZ is not set (default 20 MB, or enough space to run 10 fenced routines (whichever is larger)), ASLHEAPSZ=15 (default)

20M / (2 * 15 * 4K) = # db2fmp processes + # db2fmp threads
(20971520 bytes) / (2 * 15 * 4096 bytes) = 170.66

In this particular case, the current setting should be able to accommodate approximately 170 db2fmp processes and threads combined.

- DB2 LUW v9.5, DB2_FMP_COMM_HEAPSZ set to a specific value such as DB2_FMP_COMM_HEAPSZ=10000, ASLHEAPSZ=15

In this case both DB2_FMP_COMM_HEAPSZ and ASLHEAPSZ are both measured in 4K pages, so the calculation is as follows:

10000 / (2 * 15) = 333.33

In this particular case, the current setting should be able to accommodate approximately 333 db2fmp processes and threads combined.

Resolving The Problem

Use the calculations above to determine how many db2fmp processes and threads are allowed on the system. Use the db2pd -fmp command to ensure that the number of db2fmp process and threads are within the limits defined by the calculation. If you find that more db2fmp process and threads are needed, either decrease the ASLHEAPZ setting or increase the DB2_FMP_COMM_HEAPSZ setting to accommodate for more db2fmp processes

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Routines (SP & UDF) - db2fmp","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1;10.1;10.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21432522