I just updated from 9.7 to 10.1, to leverage the new 4gig memory limitation. However, my app only appears to be using 2. So i searched for a way to find out how memory is used and found this command:

D:\DB2\scripts>db2pd -dbptnmem

Database Member 0 -- Active -- Up 0 days 04:40:54 -- Date 09/16/2012 14:37:08

Database Member Memory Controller Statistics

Controller Automatic: N
Memory Limit:         2097152 KB
Current usage:        2057664 KB
HWM usage:            2096960 KB
Cached memory:        390464 KB

Individual Memory Consumers:

Name             Mem Used (KB) HWM Used (KB) Cached (KB)
APPL-DOMINOS              2752        160000        1024
DBMS-DB2                109888        168832           0
FMP_RESOURCES            22528         22528           0
PRIVATE                  20480         86656        9344
DB-MYAPPLI             1901760       1901760      380096
LCL-p5088                  128           128           0
LCL-p5088                  128           128           0

The line that really stands out is

Memory Limit: 2097152 KB

What does this mean? Why does my app not use 4 gig? How can I change it so that it does? Where does one configure this?


Found the answer in the doc (I should have RTM). You check the setting using:

db2 get dbm cfg

And looking for INSTANCE_MEMORY, then update with:

db2 update dbm cfg using INSTANCE_MEMORY <memoryDividedBy4KB>
  • 1
    Make sure your bufferpools are set to actually use the memory. AUTOMATIC should be the default but it's always a good thing to check.
    – AngerClown
    Sep 17 '12 at 1:10
  • @AngerClown, would you mind expanding on that? Which setting in particular are you talking about?
    – Lucas
    Sep 17 '12 at 12:33
  • 1
    If you do a get db cfg make sure SELF_TUNING_MEM is set to ON. Then run ALTER BUFFERPOOL buffpoolname SIZE AUTOMATIC. You can check current BP sizes via snapshots or with this query: SELECT DB_NAME, BP_NAME, BP_CUR_BUFFSZ as BP_CUR_PG_CNT, ((t.bp_cur_buffsz * bp_info.pagesize) /1048576) as BP_MEM_MB_SIZE FROM TABLE(SNAP_GET_BP_PART('dsrdbm01',-1)) AS T, syscat.bufferpools bp_info where t.bp_name = bp_info.bpname
    – AngerClown
    Sep 17 '12 at 15:05

The following restrictions apply: DB2 Express-C , Fixed Term License (FTL): Two processor cores with a total of maximum of four cores No more than 4 GB of memory DB2 Express-C (no charge, non-warranted): Up to two processor cores No more than 2 GB of memory

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.