470,810 Members | 863 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

memory usage in db2

Raj
Hi Guys,

We are on db2 udb v8.2 64 bit,partitioned (5 nodes)
on AIX 5.2 ( intra parllelism is enabled).

I have a question, i am trying to find the memory usage on my
production machine, we 32 gb memory and the memory used bufferpools is
very low (around 720 mb). I wonder where is all the other memory being
used? (from nmon i see that 90% of the memory is being used)

I googled and found out that db2mtrk -i -d -v shows the memory usage in

db2, after i add all the numbers i got a very low value of 1 GB( this
includes BP)

I ran ps -e -o "%z %U %c" | sort -n i see lot of db2sysc processes
which cosume all the memory what are these processes?

what is the best way to find the bufferpool size?
select * from syscat.bufferpool * number of nodes???

Thanks,
Raj

Jan 18 '06 #1
7 3966
TO calculate buffer pools size in MB, use :
select BPNAME, NPAGES*PAGES*PAGESIZE/1024/1024 AS size_in_MB
from
SYSCAT.BUFFERPOOLS

Does this answer your question?

Mike

Raj wrote:
Hi Guys,

We are on db2 udb v8.2 64 bit,partitioned (5 nodes)
on AIX 5.2 ( intra parllelism is enabled).

I have a question, i am trying to find the memory usage on my
production machine, we 32 gb memory and the memory used bufferpools is
very low (around 720 mb). I wonder where is all the other memory being
used? (from nmon i see that 90% of the memory is being used)

I googled and found out that db2mtrk -i -d -v shows the memory usage in

db2, after i add all the numbers i got a very low value of 1 GB( this
includes BP)

I ran ps -e -o "%z %U %c" | sort -n i see lot of db2sysc processes
which cosume all the memory what are these processes?

what is the best way to find the bufferpool size?
select * from syscat.bufferpool * number of nodes???

Thanks,
Raj


Jan 18 '06 #2
This shell script will tell you the real memory being used on your
server -> not real + cached like the nmon display

You can also add to the grep a specific process name, for example, your
instance name, or db2sysc

#!/usr/bin/sh
FIELD6=`ps auxw | grep -v defunct |sed -n '2,$'p | awk '{ print $5 }'`
TOTAL=0
for P in `echo $FIELD6`
do
TOTAL=`expr $TOTAL + $P`
done
echo "$TOTAL" KB

Jan 18 '06 #3
DB2 Memory Tracker: db2mtrk

-Eugene

Jan 18 '06 #4
Raj
would'nt that give the size of BP for one node???

Jan 18 '06 #5
Raj wrote:
would'nt that give the size of BP for one node???


I don't know if this is already the accumulated number in SYSCAT.BUFFERPOOLS
(you could probably just have a look and see). If it isn't then you can
simply calculate it yourself:

SELECT bpname, n.npages * p.pagesize / 1024 / 1024 AS size_in_MB
FROM syscat.bufferpools AS p JOIN syscat.bufferpooldbpartitions AS n ON
( p.bufferpoolid = n.bufferpoolid )

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jan 18 '06 #6
Hi,
I guess your memory is consumed by file system cache.. Can you paste
the output of "vmstat -v"?

Cheers,
Thiru.
DB2 DBA.
WantedToBeDBA {at} gmail {dot} com

Jan 19 '06 #7
Raj
The vmstat -v o/p
************************************************** ************************************************** ************************************************** ******
8388608 memory pages
7945351 lruable pages
324911 free pages
1 memory pools
791671 pinned pages
80.1 maxpin percentage
5.0 minperm percentage
40.0 maxperm percentage
49.6 numperm percentage
3942204 file pages
0.0 compressed percentage
0 compressed pages
39.3 numclient percentage
40.0 maxclient percentage
3122831 client pages
0 remote pageouts scheduled
0 pending disk I/Os blocked with no pbuf
6841 paging space I/Os blocked with no psbuf
961934 filesystem I/Os blocked with no fsbuf
0 client filesystem I/Os blocked with no fsbuf
411762361 external pager filesystem I/Os blocked with no
fsbuf
************************************************** ************************************************** ************************************************** ******
with the script posted by leomard the o/p was 18 GB used
************************************************** ************************************************** ************************************************** ******

nmon shows memory used as 31.9 GB
************************************************** ************************************************** ************************************************** ******

from db2
Mem Memory #
of Current
Type Level Pool
Pool(s) Size
---- ---------- --------------------
------- ------------
Inst EIAINST1 Monitor
6 1.1M
Inst EIAINST1 FCMBP
6 483.8M
Inst EIAINST1 Other
6 168.3M
Db EIA Database
6 113.8M
Db EIA Appl Control
125 765.5M
Db EIA Lock Mgr
6 248.2M
Db EIA Utility
6 96K
Db EIA Package Cache
6 55.8M
Db EIA Catalog Cache
6 3.5M
Db EIA Other
6 432K
Db EIA BufferPool
60 4.6G
Db EIA ApplGroup
25 1.7G
Db EIA SharedSort
6 0
Appl EIA Applications
248 16.8M
Appl EIA Other
248 14.3M
sheptesth 4.5G
Total memory 12.2G
************************************************** ************************************************** ************************************************** ******

are my memory calculations correct? our db is partitioned (6 logical
nodes)

Feb 17 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by rbt | last post: by
2 posts views Thread by tomvr | last post: by
2 posts views Thread by Jarvis | last post: by
20 posts views Thread by Philip Carnstam | last post: by
13 posts views Thread by Ilias Lazaridis | last post: by
1 post views Thread by yzghan | last post: by
1 post views Thread by Jean-Paul Calderone | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.