IBM Support

Why is there is a db2diag.log message from sqloUpdateKP about SEMMNI, MSGMNI and SHMMNI being capped?

Question & Answer


Question

There is an entry in the db2diag.log about the SEMMNI, MSGMNI and SHMMNI kernel parameters being capped at 32768. What does this mean for my system and what actions do I need to take?
 
2021-04-19-18.37.22.112909+540 I1132535E689 LEVEL: Severe
PID : <pid> TID : <tid> PROC : db2syscr
INSTANCE: <instance> NODE : 000
HOSTNAME: <hostname>
FUNCTION: DB2 UDB, oper system services, sqloUpdateKP, probe:10
DATA #1 : <preformatted>
The maximum allowable value for SEMMNI is capped by the kernel at 32768. For some database environments this may be insufficient. If it is insufficient, there might be errors in the db2diag.log file with a return code such as SQLO_SSEM_EXCEED_MAX. To allow a value greater than 32768, enable the kernel boot parameter ipcmni_extend. See Technote https://www.ibm.com/support/pages/node/735121 for details.

Cause

Db2 tries to automatically set some kernel parameters to values according to https://www.ibm.com/docs/en/db2/11.5?topic=unix-kernel-parameter-requirements-linux. However, in the cases of the *MNI parameters (MSGMNI, SEMMNI and SHMMNI), these values are capped at 32768. To allow values larger than 32768, the kernel boot parameter ipcmni_extend (available starting in kernel version 3.10.0-1127.el7.x86_64, or kernel version 4.18.0-147.el8_1.x86_64) needs to be enabled. This means that on some systems with large amounts of RAM and ipcmni_extend disabled, Db2 will not be able to configure these kernel parameters to the values outlined in the documentation link above.  (Note that on most systems, the maximum of 32768 is sufficient and this message can be ignored). 

Answer

On most systems, this message can be ignored as the 32768 cap is sufficient. These parameters are tied to how many Agents Db2 can spawn and as such, limit the number of Agents Db2 can have. If your system is using fewer Agents, then the cap of 32768 should be sufficient and no further action is needed.
If your system is hitting the cap, then you will need to either reduce connections, or reduce parallelism, or enable the ipcmni_extend parameter to increase the value above 32768 (this will require an upgrade to the OS kernel level if your current version is below 3.10.0-1127.el7.x86_64 or 4.18.0-147.el8_1.x86_64).
You can confirm that you are hitting these capped values by checking for messages in the db2diag.log like the following, indicating that Db2 ran out of the IPC resource requested:
2020-04-14-01.23.06.849143-420 E42143E400            LEVEL: Error (OS)
PID     : <pid>                TID : <tid> PROC : db2sysc 0
INSTANCE: <instname>              NODE : 000
HOSTNAME: <hostname>
FUNCTION: DB2 UDB, oper system services, sqlo_waitlist::initialize, probe:10
MESSAGE : ZRC=0x8300001C=-2097151972
CALLED  : OS, -, semget                           OSERR: ENOSPC (28)

2020-04-14-11.16.14.698368-420 E72551E480 LEVEL: Severe
PID : <pid>  TID : <tid> PROC : db2sysc 0
INSTANCE: <instname> NODE : 000
HOSTNAME: <hostname>
FUNCTION: DB2 UDB, oper system services, sqloEDUEntry, probe:10
CALLED : DB2 UDB, oper system services, sqloGetShrEDUWaitElem
RETCODE : ZRC=0x850F0081=-2062614399=SQLO_SSEM_EXCEED_MAX
"Requesting too many semaphores"
DIA8336C Requested too many semaphores.

[{"Type":"SW","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":"a8m500000008PkoAAE","label":"Operating System or Hardware"}],"ARM Case Number":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"11.1.0;11.5.4;and future releases"}]

Document Information

Modified date:
10 May 2021

UID

ibm16451257