Memory usage can be an issue for DB2 whether a server has 2 GB or 2 TB of memory. There can be issues with making DB2 use all of the memory, and there can be issues with DB2 causing paging or even kernel panics. Because of this, it is important to understand how much memory DB2 is using.
DB2’s Memory Model
There is a lot of good material on understanding the DB2 memory model. I suggest this developerWorks article as a great read on this: http://www.ibm.com/developerworks/data/library/techarticle/dm-0406qi/
There are basically three types of memory areas – ones that are allocated at the instance level, ones that are allocated at the database level, and ones that are allocated at the application level.
Instance level memory areas include:
- AUDIT_BUF_SZ
- MON_HEAP_SZ
- FCM areas
Database level memory areas include:
- Size of bufferpools
- LOCKLIST
- DBHEAP
- UTIL_HEAP_SZ
- PCKCACHESZ
- SHEAPTHRES_SHR
- CATALOGCACHE_SZ
Application level memory areas include:
- APPLHEAPSZ
- STMTHEAP
- STAT_HEAP_SZ
- Private Sort Heaps (SHEAPTHRES and SORTHEAP)
- AGENT_STACK_SZ
- ASLHEAPSZ
- RQRIOBLK
Why there is no exact way to say “DB2 should be using X memory at any given time”?
There are two big reasons you cannot just add up parameters as configured in DBM and DB configurations and say exactly how much memory DB2 should be using at any one time.
- Some memory areas are allocated only as applications connect or agents are started up, and the number of connected applications can change from second to second.
- Different memory is allocated at different times and in different amounts. Some areas are allocated in full on instance start or database activation or application connection. Some areas start at a minimum size and are incremented by db2 up to a configured maximum
If you work really hard at it, you can come up with an accurate range of memory allocation that DB2 should fall into at any given time based on your configuration settings, but estimating an exact number accurately is very difficult, especially for a live system with a variable number of end users.
How Much Memory is DB2 Using Right Now
For the most part, I will leave looking at DB2 memory from the OS side to SAs and when needed, googling. I have used top before on linux/UNIX, but it just reports one (generally large) number for all of DB2. That is not terribly helpful. The main situation I have used it in was when someone was using it and called me and said “What is this db2sysc that is using over 50% of the memory?”, and I had to compare it back to what memory DB2 thought it was using.
top
top looks something like this:
$ top top - 14:47:43 up 316 days, 3:57, 1 user, load average: 0.04, 0.02, 0.00 Tasks: 274 total, 1 running, 273 sleeping, 0 stopped, 0 zombie Cpu(s): 0.2%us, 0.3%sy, 0.0%ni, 99.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 65968876k total, 65464000k used, 504876k free, 8036k buffers Swap: 2097144k total, 140632k used, 1956512k free, 62781652k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 23675 db2inst 20 0 15176 1460 992 R 0.7 0.0 0:00.25 top 30951 db2inst 20 0 38.0g 12g 12g S 0.7 20.1 669:37.28 db2sysc 27935 db2ins2 20 0 9656m 2.7g 2.5g S 0.3 4.3 491:19.14 db2sysc
The nice thing about top is that it does show changes over time, but it can also consume system resources.
db2mtrk
I have found db2mtrk as a reliable method, though use of SQL later in this article is my favorite method. db2mtrk is used like this:
$ db2mtrk -i Tracking Memory on: 2015/12/08 at 14:46:48 Memory for instance other fcmbp monh 60.2M 8.8M 128.0K $ db2mtrk -d Tracking Memory on: 2015/12/08 at 14:46:18 Memory for database: SAMPLE utilh pckcacheh other catcacheh bph (5) bph (4) 3.0M 256.0K 192.0K 192.0K 7.1M 17.9M bph (3) bph (2) bph (1) bph (S32K) bph (S16K) bph (S8K) 306.1M 10.8G 224.1M 1.8M 1.5M 1.4M bph (S4K) shsorth lockh dbh apph (55736)appshrh 1.3M 0 409.8M 339.6M 64.0K 192.0K
Adding up all of these numbers will give you a pretty accurate number as far as total memory usage. There are a few other useful option on db2mtrk – “db2mtrk -h” provides both a usage diagram and meanings of the abbreviations used for the various heaps.
db2top
I am a big fan of db2top for watching a database in real time. The memory screen can be useful here, and shows similar memory areas:
Notice in the very middle at the bottom, it gives a total number that matches up well with the other methods described here.
db2pd
db2pd also lets us look at these memory areas in detail:
$ db2pd -mempools Database Member 0 -- Active -- Up 102 days 03:17:37 -- Date 2015-12-08-15.04.07.335241 Memory Pools: Address MemSet PoolName Id SecondId Overhead LogSz LogHWM PhySz PhyHWM CfgSize Bnd BlkCnt CfgParm 0x000000020002C458 DBMS fcm 74 0 0 0 0 0 0 786432 No 0 n/a 0x0000000200029570 DBMS fcmsess 77 0 65376 1658592 1658592 1835008 1835008 1835008 No 3 n/a 0x0000000200026688 DBMS fcmchan 79 0 97984 9137152 10437632 9240576 10551296 9240576 No 7 n/a 0x00000002000237A0 DBMS fcmbp 13 0 97984 12156928 21069824 12713984 22740992 12713984 No 9 n/a 0x00000002000208B8 DBMS fcmctl 73 0 188224 2355069 2355069 2555904 2555904 2555904 No 86 n/a 0x000000020001AAE8 DBMS monh 11 0 122496 946466 1690259 1179648 1835008 393216 No 231 MON_HEAP_SZ 0x0000000200017C00 DBMS resynch 62 0 32576 2457720 2457720 2555904 2555904 2752512 No 2 n/a 0x0000000200014D18 DBMS ostrack 57 0 42592 416240 416240 524288 524288 524288 No 3 n/a 0x0000000200011E30 DBMS apmh 70 0 0 8470284 54638244 27525120 56098816 16449536 No 247 n/a 0x000000020000EF48 DBMS kerh 52 0 50912 30592339 80487819 35913728 85524480 32440320 No 1346 n/a 0x000000020000C060 DBMS bsuh 71 0 38784 6380590 10081774 7012352 11075584 29687808 No 304 n/a 0x0000000200009178 DBMS sqlch 50 0 0 2758797 2772642 2818048 2818048 2818048 No 206 n/a 0x0000000200006290 DBMS djh 83 0 0 32 32 65536 65536 65536 No 1 n/a 0x00000002000033A8 DBMS krcbh 69 0 0 6489088 6489728 6553600 6553600 6553600 No 20 n/a 0x00000002000004C0 DBMS eduah 72 0 65344 8192024 8192024 8257536 8257536 8257536 No 1 n/a 0x00000002100004C0 FMP undefh 59 0 48000 737400 737400 786432 786432 23003136 No 6 n/a $ db2pd -db SAMPLE -mempools Database Member 0 -- Database SAMPLE -- Active -- Up 102 days 03:12:21 -- Date 2015-12-08-15.04.24.616338 Memory Pools: Address MemSet PoolName Id SecondId Overhead LogSz LogHWM PhySz PhyHWM CfgSize Bnd BlkCnt CfgParm 0x00007F8F0AD05E00 SAMPLE utilh 5 0 0 243935524 3025246886 357367808 3381460992 8192000000 No 24377 UTIL_HEAP_SZ 0x00007F8F0AD00030 SAMPLE pckcacheh 7 0 3516288 79682028 134150417 84213760 215154688 134217728 No 22069 PCKCACHESZ 0x00007F8F0773BBD0 SAMPLE xmlcacheh 93 0 50880 145552 145552 196608 196608 2097152 No 1 n/a 0x00007F8F07738CE8 SAMPLE catcacheh 8 0 52736 2034314 4320328 4784128 5439488 2097152 No 1696 CATALOGCACHE_SZ 0x00007F8F07730030 SAMPLE bph 16 5 65376 6958976 22417280 7733248 23330816 7733248 No 50 n/a 0x00007F8A59025110 SAMPLE bph 16 4 65376 18432384 18432384 19005440 19005440 19005440 No 136 n/a 0x00007F8A5901F340 SAMPLE bph 16 3 196128 321224832 427188352 321781760 428212224 321781760 No 2411 n/a 0x00007F8A59019570 SAMPLE bph 16 2 1895904 11649531264 11649531264 11654594560 11654594560 11654594560 No 88156 n/a 0x00007F8A590137A0 SAMPLE bph 16 1 1634400 241902208 8375713408 243859456 8379629568 243859456 No 1802 n/a 0x00007F8A5900D9D0 SAMPLE bph 16 4099 0 784768 784768 1835008 1835008 1835008 No 5 n/a 0x00007F8A59007C00 SAMPLE bph 16 4098 0 522624 522624 1572864 1572864 1572864 No 3 n/a 0x00007F8A59001E30 SAMPLE bph 16 4097 0 391552 391552 1441792 1441792 1441792 No 2 n/a 0x00007F8A58FFC060 SAMPLE bph 16 4096 0 326016 326016 1376256 1376256 1376256 No 2 n/a 0x00007F8A58FF6290 SAMPLE shsorth 18 0 0 12104 238675897278 2359296 10315825152 13926400000 No 18 SHEAPTHRES_SHR 0x00007F8A58FF33A8 SAMPLE lockh 4 0 0 483436032 1585489408 483459072 1585512448 429654016 No 1 LOCKLIST 0x00007F8A58FF04C0 SAMPLE dbh 2 0 14101824 2616346134 2620041663 2725511168 2732654592 1215299584 No 994735 DBHEAP 0x00007F92DB9B5E00 Appl apph 1 5081 0 21658 90478 131072 131072 1048576 No 45 APPLHEAPSZ 0x00007F8972810030 Appl apph 1 5080 0 18342 95696 131072 131072 1048576 No 30 APPLHEAPSZ 0x00007F887A240030 Appl apph 1 5075 5185920 52847994 105103963 72286208 134610944 1048576 No 2836 APPLHEAPSZ 0x00007F92D7E40030 Appl apph 1 4777 0 19887 88459 131072 131072 1048576 No 35 APPLHEAPSZ 0x00007F8972445E00 Appl apph 1 4593 0 25632 56332 65536 65536 1048576 No 48 APPLHEAPSZ 0x00007F92D6B15E00 Appl apph 1 4578 0 25632 56332 65536 65536 1048576 No 48 APPLHEAPSZ 0x00007F889C702F18 Appl apph 1 4585 0 25632 56332 65536 65536 1048576 No 48 APPLHEAPSZ 0x00007F88FA7A0030 Appl apph 1 4588 0 25632 56332 65536 65536 1048576 No 48 APPLHEAPSZ 0x00007F92D6705E00 Appl apph 1 4589 0 25632 56332 65536 65536 1048576 No 48 APPLHEAPSZ 0x00007F92D3482F18 Appl apph 1 4586 0 25632 56332 65536 65536 1048576 No 48 APPLHEAPSZ 0x00007F889A888CE8 Appl apph 1 4569 0 27518 3782694 131072 5308416 1048576 No 65 APPLHEAPSZ 0x00007F896AA5BBD0 Appl apph 1 3150 0 25199 268897 131072 327680 1048576 No 49 APPLHEAPSZ 0x00007F89204F0030 Appl apph 1 3141 0 25199 259721 196608 327680 1048576 No 49 APPLHEAPSZ 0x00007F88C38A8CE8 Appl apph 1 3145 0 25199 259721 131072 327680 1048576 No 49 APPLHEAPSZ 0x00007F887A375E00 Appl apph 1 3148 0 26864 261386 131072 327680 1048576 No 53 APPLHEAPSZ 0x00007F92D6E65E00 Appl apph 1 3144 0 25199 259721 131072 327680 1048576 No 49 APPLHEAPSZ 0x00007F92DBD72F18 Appl apph 1 3138 0 25199 259721 196608 327680 1048576 No 49 APPLHEAPSZ 0x00007F92DBED8CE8 Appl apph 1 3151 0 25199 259721 196608 327680 1048576 No 49 APPLHEAPSZ 0x00007F8879390030 Appl apph 1 3143 0 26864 276906 131072 327680 1048576 No 53 APPLHEAPSZ 0x00007F92D477BBD0 Appl apph 1 2597 0 26625 2160937 196608 3407872 1048576 No 55 APPLHEAPSZ 0x00007F92D23833A8 Appl apph 1 62188 0 21354 21263671 131072 26345472 1048576 No 51 APPLHEAPSZ 0x00007F88177B1BD0 Appl apph 1 62171 259968 1025697 5905673 1966080 7995392 1048576 No 95 APPLHEAPSZ 0x00007F88C4745E00 Appl apph 1 62168 0 17706 56385 65536 65536 1048576 No 28 APPLHEAPSZ 0x00007F88F709BBD0 Appl apph 1 59836 0 28848 12700563 1179648 17432576 1048576 No 75 APPLHEAPSZ 0x00007F92D3B82F18 Appl apph 1 58021 0 28308 46898498 1900544 57802752 1048576 No 77 APPLHEAPSZ 0x00007F88C17F0030 Appl apph 1 58002 0 49166 854766145 38273024 1058340864 1048576 No 296 APPLHEAPSZ 0x00007F889E1F5E00 Appl apph 1 58009 0 17670 56361 65536 65536 1048576 No 28 APPLHEAPSZ 0x00007F8920478CE8 Appl apph 1 52149 0 27489 2836154 65536 4063232 1048576 No 56 APPLHEAPSZ 0x00007F92DB9B8CE8 Appl apph 1 52109 0 28665 87970772 18415616 121438208 1048576 No 88 APPLHEAPSZ 0x00007F884CEEE030 Appl apph 1 52110 0 17666 56357 65536 65536 1048576 No 28 APPLHEAPSZ 0x00007F92D2530030 Appl apph 1 22 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D24E8CE8 Appl apph 1 21 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D24E2F18 Appl apph 1 20 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D24BBBD0 Appl apph 1 19 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D24B5E00 Appl apph 1 18 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D24B0030 Appl apph 1 17 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D23B5110 Appl apph 1 16 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D23AF340 Appl apph 1 15 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D23A9570 Appl apph 1 14 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D23A37A0 Appl apph 1 13 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D239D9D0 Appl apph 1 12 0 99179 99683 196608 196608 1048576 No 1046 APPLHEAPSZ 0x00007F92D2397C00 Appl apph 1 11 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D2391E30 Appl apph 1 10 0 17259 19243 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D238C060 Appl apph 1 9 0 17259 17259 65536 65536 1048576 No 22 APPLHEAPSZ 0x00007F92D23804C0 Appl appshrh 20 0 711232 59805264 175920784 94109696 232128512 81920000 No 9639 application shared
There are interesting looking columns here for things like high water marks and upper bounds.
For a slightly different way of looking at it, you can also look at it from a memory sets point of view with db2pd:
$ db2pd -memsets Database Member 0 -- Active -- Up 102 days 03:16:08 -- Date 2015-12-08-15.02.38.106896 Memory Sets: Name Address Id Size(Kb) Key DBP Type Unrsv(Kb) Used(Kb) HWM(Kb) Cmt(Kb) Uncmt(Kb) CmtRt(Kb) DcmtRt(Kb) HoldRt(Kb) Sngl DBMS 0x0000000200000000 737902602 226624 0xC7CCFD61 0 0 88064 116288 207616 150976 75648 1024 17152 0 422 Seg0 0x00007F88FF350000 1603960854 0 0x0 0 0 0 0 0 0 0 0 0 0 0 FMP 0x0000000210000000 737935371 22784 0x0 0 0 2 0 1024 22784 0 21760 0 0 0 Trace 0x0000000000000000 737869831 33355 0xC7CCFD74 0 -1 0 33355 0 33355 0 0 0 0 0 PRIVATE 0x00007F932E48C000 0 357312 0x0 0 9 0 357312 546368 0 0 0 0 0 0 $ db2pd -db SAMPLE -memsets Database Member 0 -- Database SAMPLE -- Active -- Up 102 days 03:10:43 -- Date 2015-12-08-15.02.46.877910 Memory Sets: Name Address Id Size(Kb) Key DBP Type Unrsv(Kb) Used(Kb) HWM(Kb) Cmt(Kb) Uncmt(Kb) CmtRt(Kb) DcmtRt(Kb) HoldRt(Kb) Sngl SAMPLE 0x00007F8A58FF0000 738164748 38796288 0x0 0 1 1958464 15672000 22441408 24046976 11493568 255168 11493568 808192 2244 AppCtl 0x00007F92D2380000 738131977 352896 0x0 0 12 0 250944 2984896 349824 3072 1472 101184 0 110 Seg0 0x00007F8968000000 1066958865 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg1 0x00007F8920000000 1580400656 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg2 0x00007F88EE570000 1603993623 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg3 0x00007F88BBE30000 1604026392 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg4 0x00007F8899E50000 1604059161 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg5 0x00007F8878F70000 1604091930 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg6 0x00007F8856A8E000 2122252308 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg7 0x00007F8846A8E000 2122285077 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg8 0x00007F8810D16000 64487442 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg9 0x00007F87DD676000 64520211 0 0x0 0 12 0 0 0 0 0 0 0 0 0 Seg10 0x00007F87BB7C6000 64552987 0 0x0 0 12 0 0 0 0 0 0 0 0 0 App5080 n/a 719421468 128 0x0 0 4 0 128 0 128 0 0 0 0 0
SQL and MON_GET_*
The MON_GET table functions allow the same information to be returned by query. They will work in DB2 9.7 and up, though these examples are from DB2 10.5. MON_GET_MEMORY_SETS and MON_GET_MEMkORY_POOLS should correspond to the db2pd way of looking at things. This is the first method presented that requires a database connection to work.
select substr(HOST_NAME,1,25) as HOST_NAME , substr(DB_NAME,1,10) as DBNAME , MEMORY_SET_TYPE , MEMORY_SET_ID , MEMORY_SET_SIZE , MEMORY_SET_COMMITTED , MEMORY_SET_USED , MEMORY_SET_USED_HWM from table(MON_GET_MEMORY_SET(null,null,-2)) as t with ur HOST_NAME DBNAME MEMORY_SET_TYPE MEMORY_SET_ID MEMORY_SET_SIZE MEMORY_SET_COMMITTED MEMORY_SET_USED MEMORY_SET_USED_HWM ------------------------- ---------- -------------------------------- -------------------- -------------------- -------------------- -------------------- -------------------- xxxxxxxxxxxx - DBMS 0 226624 150976 116224 207616 xxxxxxxxxxxx - FMP 2 22784 22784 1024 1024 xxxxxxxxxxxx - PRIVATE 9 356672 356672 183360 525824 xxxxxxxxxxxx SAMPLE DATABASE 1 38796288 24046976 15672000 22441408 xxxxxxxxxxxx SAMPLE APPLICATION 12 291200 291200 176320 2984896 5 record(s) selected. select substr(HOST_NAME,1,25) as HOST_NAME , substr(DB_NAME,1,10) as DBNAME , MEMORY_SET_TYPE , MEMORY_POOL_TYPE , MEMORY_POOL_ID , APPLICATION_HANDLE , EDU_ID , MEMORY_POOL_USED , MEMORY_POOL_USED_HWM from table(MON_GET_MEMORY_POOL(null,null,-2)) as t with ur HOST_NAME DBNAME MEMORY_SET_TYPE MEMORY_POOL_TYPE MEMORY_POOL_ID APPLICATION_HANDLE EDU_ID MEMORY_POOL_USED MEMORY_POOL_USED_HWM ------------------------- ---------- -------------------------------- -------------------------------- -------------------- -------------------- -------------------- -------------------- -------------------- xxxxxxxxxxxx - DBMS FCM_LOCAL 74 - - 0 0 xxxxxxxxxxxx - DBMS FCM_SESSION 77 - - 1792 1792 xxxxxxxxxxxx - DBMS FCM_CHANNEL 79 - - 9024 10304 xxxxxxxxxxxx - DBMS FCMBP 13 - - 12416 22208 xxxxxxxxxxxx - DBMS FCM_CONTROL 73 - - 2496 2496 xxxxxxxxxxxx - DBMS MONITOR 11 - - 1152 1792 xxxxxxxxxxxx - DBMS RESYNC 62 - - 2496 2496 xxxxxxxxxxxx - DBMS OSS_TRACKER 57 - - 512 512 xxxxxxxxxxxx - DBMS APM 70 - - 26880 54784 xxxxxxxxxxxx - DBMS KERNEL 52 - - 35072 83520 xxxxxxxxxxxx - DBMS BSU 71 - - 6784 10816 xxxxxxxxxxxx - DBMS SQL_COMPILER 50 - - 2752 2752 xxxxxxxxxxxx - DBMS FEDERATED 83 - - 64 64 xxxxxxxxxxxx - DBMS KERNEL_CONTROL 69 - - 6400 6400 xxxxxxxxxxxx - DBMS EDU 72 - - 8064 8064 xxxxxxxxxxxx - FMP MISC 59 - - 768 768 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 22064 64 128 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53098 384 384 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 47472 960 5120 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58335 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58334 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58332 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58327 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58326 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58323 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58322 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58320 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58317 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58312 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58311 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58310 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58307 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58304 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58302 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58300 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58297 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58296 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58295 192 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58291 512 4416 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58290 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58289 768 768 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58288 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58287 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58285 192 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58284 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58283 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58275 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58273 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58270 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58266 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58262 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58261 640 4608 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58260 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58259 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58258 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58257 704 704 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58256 768 4800 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58255 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58254 192 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58253 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58252 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58251 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58247 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58246 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58245 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58244 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58243 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58241 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58239 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58238 192 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58237 192 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58234 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 18258 832 5056 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53113 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53105 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53103 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53101 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53099 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53096 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53095 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53094 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53093 1024 1920 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53066 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53025 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53009 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52993 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52937 1024 4864 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52914 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52904 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52902 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52885 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52882 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52880 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52857 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52846 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52829 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52824 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52821 448 2560 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52816 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52810 896 5184 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52795 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52780 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52778 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52758 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52755 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52748 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 47441 768 5120 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 49161 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 49130 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 49070 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46086 1216 5248 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46107 1088 5184 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 47475 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 47437 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46169 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46154 576 896 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46122 896 89408 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46051 320 512 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46033 704 704 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46024 640 12096 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 45987 960 177536 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 45979 448 960 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 45970 640 1152 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 32647 832 5184 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 38180 704 4608 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 38167 1216 5440 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 37957 704 5056 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 24617 640 4800 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 29908 448 4544 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 26134 960 4928 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 18277 1088 4992 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 16912 512 832 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 37492 960 5184 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 33989 896 4992 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 506 512 5120 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 68 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 67 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 66 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 65 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 64 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 63 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 62 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 61 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 60 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 59 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 58 576 576 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 57 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 56 192 192 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 55 384 384 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 54 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 53 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 52 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 51 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 50 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 49 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 48 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 47 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 46 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 45 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 44 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 43 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 42 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 41 256 256 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 40 256 320 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 39 256 320 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 38 256 320 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 37 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 36 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 35 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 34 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 33 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 32 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 31 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 30 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 29 0 0 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 28 0 0 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 27 64 2176 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 26 384 131520 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 25 64 4288 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 24 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 21 0 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 20 0 0 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 16 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 13 64 64 xxxxxxxxxxxx - PRIVATE PRIVATE 88 - 0 64 64 xxxxxxxxxxxx - PRIVATE USER_DATA 95 - 0 7680 130304 xxxxxxxxxxxx - PRIVATE PERSISTENT_PRIVATE 86 - 0 94400 258304 xxxxxxxxxxxx SAMPLE DATABASE UTILITY 5 - - 348992 3302208 xxxxxxxxxxxx SAMPLE DATABASE PACKAGE_CACHE 7 - - 82240 210112 xxxxxxxxxxxx SAMPLE DATABASE XMLCACHE 93 - - 192 192 xxxxxxxxxxxx SAMPLE DATABASE CAT_CACHE 8 - - 4672 5312 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 7552 22784 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 18560 18560 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 314240 418176 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 11381440 11381440 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 238144 8183232 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 1792 1792 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 1536 1536 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 1408 1408 xxxxxxxxxxxx SAMPLE DATABASE BP 16 - - 1344 1344 xxxxxxxxxxxx SAMPLE DATABASE SHARED_SORT 18 - - 2304 10074048 xxxxxxxxxxxx SAMPLE DATABASE LOCK_MGR 4 - - 472128 1548352 xxxxxxxxxxxx SAMPLE DATABASE DATABASE 2 - - 2661632 2668608 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 5093 - 36480 59200 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 5080 - 128 128 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4777 - 128 128 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4593 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4578 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4585 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4588 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4589 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4586 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 4569 - 128 5184 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3150 - 128 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3141 - 192 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3145 - 128 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3148 - 128 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3144 - 128 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3138 - 192 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3151 - 192 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 3143 - 128 320 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 2597 - 192 3328 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 62188 - 128 25728 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 62171 - 1920 7808 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 62168 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 59836 - 1152 17024 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 58021 - 1856 56448 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 58002 - 37376 1033536 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 58009 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 52149 - 64 3968 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 52109 - 17984 118592 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 52110 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 22 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 21 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 20 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 19 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 18 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 17 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 16 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 15 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 14 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 13 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 12 - 192 192 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 11 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 10 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPLICATION 1 9 - 64 64 xxxxxxxxxxxx SAMPLE APPLICATION APPL_SHARED 20 - - 91776 226688 247 record(s) selected.
Now that is pretty long, but think of the potential for easy addition and averaging and such.
I think you are going to get the best possible answer to “how much memory is DB2 using” from DB2’s perspective by using:
$ db2 "select SUM(MEMORY_POOL_USED) as TOT_MEMORY_USED from table(MON_GET_MEMORY_POOL(null,null,-2)) as t with ur" TOT_MEMORY_USED -------------------- 16013824 1 record(s) selected.