Hi there
I don't know if I get something wrong or if this is a bug.
A colleague activated a memory monitoring within check_mk on one of our newer Db2 servers and it's showing strange results.
After investigation I see that these results are coming from Db2 itself.
(changed some names due to security restrictions)
We're running Redhat on an AS/400 IBMi Power partition.
[db2inst1@... ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[db2inst1@... ~]$ uname -a
Linux ... 3.10.0-957.el7.ppc64le #1 SMP Thu Oct 4 20:51:36 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux
Db2 is a 11.1.4.4 for PowerPC Little Endian (from 11.1 on there are only Little Endian versions for PPC except AIX)
[db2inst1@... ~]$ db2level
DB21085I This instance or install (instance name, where applicable:
"db2inst1") uses "64" bits and DB2 code release "SQL11014" with level
identifier "0205010F".
Informational tokens are "DB2 v11.1.4.4", "s1811091400", "DYN1811091400PPCLE",
and Fix Pack "4".
Product is installed at "/opt/ibm/db2/V11.1_FP4".
Looking into the operating system it shows 255GB memory without swap.
[db2inst1@... ~]$ free -h
total used free shared buff/cache available
Mem: 255G 2.7G 106G 129G 146G 121G
Swap: 4.0G 0B 4.0G
We're running three databases within one instance.
First strange thing is, db2pd is saying we're using more memory than we're limited to (see memory limit and current usage):
[db2inst1@... ~]$ db2pd -dbptnmem
Database Member 0 -- Active -- Up 239 days 00:52:46 -- Date 2020-01-16-11.04.38.049815
Database Member Memory Controller Statistics
Controller Automatic: Y
Controller License Limit: N
Controller Limit Enforced: N
Memory Limit: 249190148 KB
Current usage: 304772928 KB
HWM usage: 347817920 KB
Cached memory: 27731584 KB
Individual Memory Consumers:
Name Mem Used (KB) HWM Used (KB) Cached (KB)
========================================================
APPL-A 29632 160000 23040
APPL-B 160000 160000 141952
APPL-C 160000 160000 153984
DBMS-db2inst1 175552 175552 2048
FMP_RESOURCES 22528 22528 20992
PRIVATE 104128 165824 0
DB-C 147150528 172275840 12492032
DB-B 62881792 63157376 6236864
DB-A 94088768 94088768 8660672
Additionally the sum of all three database memory is higher than the instance memory:
[db2inst1@... ~]$ db2 get dbm cfg show detail| grep -i instance_memory
Global instance memory (% or 4KB) (INSTANCE_MEMORY) = AUTOMATIC(62297537) AUTOMATIC(62297537)
[db2inst1@... ~]$ db2 connect to A>/dev/null;db2 get db cfg for A show detail | grep -i database_memory
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(23522246) AUTOMATIC(23522246)
[db2inst1@... ~]$ db2 connect to B>/dev/null;db2 get db cfg for B show detail | grep -i database_memory
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(15720512) AUTOMATIC(15626168)
[db2inst1@... ~]$ db2 connect to C>/dev/null;db2 get db cfg for C show detail | grep -i database_memory
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(37694304) AUTOMATIC(37694304)
We've got a second system with Db2 10.5.0.8 (Big Endian) on a similar operating system which is showing plausible memory values.
Do I get something wrong here?
Is db2pd buggy (maybe only in the little endian version for power)?
If no one could explain that to me I might raise a PMR.
------------------------------
----------------
Sebastian Zok
Db2 Database Administrator
------------------------------
#Db2