By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,924 Members | 1,651 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,924 IT Pros & Developers. It's quick & easy.

memeory usage

P: n/a
Raj
I am trying to find the memory usage in db2, i've posted several topics
here but never found the answer,I would really appreciate any help ...
my question is i see 95 % of memory on my production machine being
used, but can't find what db2 processes are using it up?

even with a db2stop i see 50 % memory being used ( i used nmon, vmstat
to find the memory usage [all i can see is some db2sysc and db2fmp
process use up the mem]...
i don't have access to svmon) below are the output of vmstat, and
db2mtrk

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
************************************************** ****************************

from db2 ( for 6 partitions)
----------------------------------------------------------------------------------------------------------------------------

Mem Memory # of Current
Type Pool Pool(s) Size
---- -------------------- ------- ------------
Inst Monitor 6 1M
Inst FCMBP 6 483.8M
Inst Other 6 167.4M
Db Database 6 110M
Db Appl Control 60 367.9M
Db Lock Mgr 6 248.2M
Db Utility 6 96K
Db Package Cache 6 20.1M
Db Catalog Cache 6 2.7M
Db Other 6 192K
Db BufferPool 60 4.6G
Db ApplGroup 12 849.7M
Db SharedSort 6 0
Appl Applications 260 19.7M
Appl Other 260 371.9M
Total memory 7.7G
(sheptesth 4.5G )
--------------------------------------------------------------------------------------------------------------------------

Thanks,
Raj

Feb 24 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Raj wrote:
I am trying to find the memory usage in db2, i've posted several topics
here but never found the answer,I would really appreciate any help ...
my question is i see 95 % of memory on my production machine being
used, but can't find what db2 processes are using it up?


You have several processes in DB2 that work together via shared memory. So
you can't simply say that xxx MB belong to this process and yyy MB to
another process. Therefore, the db2mtrk tool shows you which memory heap
(or memory pool) takes how much space - regardless of the processes.

Did you already have a look at the db2top tool? http://tinyurl.com/g92t8

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 24 '06 #2

P: n/a
Raj
Yeah i used that too .. what i don't understand is even with a db2stop
nmon shows 50 % memory as being used... ( all i can see is db2sysc
process....

Feb 24 '06 #3

P: n/a
Raj wrote:
Yeah i used that too .. what i don't understand is even with a db2stop
nmon shows 50 % memory as being used... ( all i can see is db2sysc
process....


After a db2stop there shouldn't be any db2sysc processes left over. At
least there are none on Unix systems, except the db2fmcd.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 24 '06 #4

P: n/a
Hi Raj,

Look at the numperm setting from your vmstat output - that shows that
49.6% of memory is being consumed for the file cache. Your maxperm
setting looks a little high for a database server - database servers
have their own form of cacheing for database files - i.e. the DB2
buffer pools. Since numperm is higher than maxperm, my guess is that
there isn't that strong of a demand for memory on the system at the
time. However, it will still show up as memory being used until some
other process needs it (at which time, clean file cache pages will
likely just be discarded, lowering numperm).

You should look into CIO/DIO support in DB2, since that avoids double
buffering - i.e. a database file being cached both in the OS file
cache, and in the DB2 buffer pools. CIO/DIO circumvents the file
cache, meaning the page will only be cached once in the DB2 buffer
pools.

Cheers,
Liam.

Feb 24 '06 #5

P: n/a
Raj
Thanks a lot Liam... we had to reboot our server now i see with out
db2start % free mem is 90, after db2start and activating the databse it
gets to about 40 %, which makes more sense ... but i am sure it will
get back to 95 % used in few days...

what is CIO/DIO support?

Feb 27 '06 #6

P: n/a
From the online information center; search on "CIO":

Direct I/O (DIO) and concurrent I/O (CIO) support

Direct I/O (DIO) improves memory performance because it bypasses caching
at the file system level. This process reduces CPU overhead and makes
more memory available to the database instance.

Concurrent I/O (CIO) includes the advantages of DIO and also relieves
the serialization of write accesses.

DB2 Universal Database(TM) (UDB) supports DIO and CIO on AIX(R); and DIO
on HP-UX, Solaris Operating Environment, Linux(TM), and Windows(R).

The keywords NO FILE SYSTEM CACHING and FILE SYSTEM CACHING are part of
the CREATE and ALTER TABLESPACE SQL statements to allow you to specify
whether DIO or CIO is to be used with each table space. When NO FILE
SYSTEM CACHING is in effect, DB2(R) UDB attempts to use concurrent I/O
wherever possible. In cases, where CIO is not supported (for example, if
JFS is used), DIO is used instead.
Philip Sherman
Raj wrote:
Thanks a lot Liam... we had to reboot our server now i see with out
db2start % free mem is 90, after db2start and activating the databse it
gets to about 40 %, which makes more sense ... but i am sure it will
get back to 95 % used in few days...

what is CIO/DIO support?

Feb 27 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.