Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

memeory usage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raj - 24 Feb 2006 15:02 GMT
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
Knut Stolze - 24 Feb 2006 15:08 GMT
> 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

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

Raj - 24 Feb 2006 15:38 GMT
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....
Knut Stolze - 24 Feb 2006 20:59 GMT
> 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.

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

Liam Finnie - 24 Feb 2006 21:01 GMT
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.
Raj - 27 Feb 2006 14:21 GMT
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?
Phil Sherman - 27 Feb 2006 20:38 GMT
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

> 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.