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

correlation between ipcs -mb and db2mtrk

P: n/a
I am running the following commands on an AIX 5.2 server, using db2 udb
v8.2.2.
my ipcs -mb command gives me the following:
IPC status from /dev/mem as of Mon Nov 20 12:47:25 EST 2006
T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0xffffffff --rw-rw---- root system 4096
m 1 0xffffffff D-rw-rw-rw- db2inst1 db2iadm1 140665792
m 70254596 0x0d00055c --rw-rw---- root system 1440
m 400556038 0x9efe1774 --rw-rw-rw- dbi1327 db2iadm1 140665792
m 211812360 0xffffffff D-rw-rw-rw- db2inst1 db2iadm1 140665792
m 573571084 0xffffffff --rw------- dbi1327 db2iadm1 245284864
m 697303053 0x9efe1761 --rw------- dbi1327 db2iadm1 29163520
m 973078544 0xffffffff --rw------- dbi1327 db2iadm1 1342177280
m 75497489 0xffffffff D-rw------- db2fenc1 db2fadm1 245284864
m 704643090 0x39220c68 --rw-rw---- db2inst1 db2iadm1 184549376
m 140509203 0x39220b74 --rw-rw-rw- db2inst1 db2iadm1 140665792
m 402653204 0x39220b61 --rw------- db2inst1 db2iadm1 29163520
m 449839126 0xffffffff --rw------- db2fenc1 db2fadm1 245284864
m 845152279 0xffffffff --rw------- db2inst1 db2iadm1 131072
and my db2mtrk -i -d -v command :

dbi1327@ep2pcdb14 db2mtrk -i -d -v
Tracking Memory on: 2006/11/20 at 13:00:53

Memory for instance

Database Monitor Heap is of size 212992 bytes
Other Memory is of size 1392640 bytes
Total: 1605632 bytes

Memory for database: DB1327PP

Backup/Restore/Util Heap is of size 131072 bytes
Package Cache is of size 7208960 bytes
Catalog Cache Heap is of size 2555904 bytes
Buffer Pool Heap is of size 42352640 bytes
Buffer Pool Heap is of size 84606976 bytes
Buffer Pool Heap is of size 8552448 bytes
Buffer Pool Heap is of size 69320704 bytes
Buffer Pool Heap is of size 43368448 bytes
Buffer Pool Heap is of size 138608640 bytes
Buffer Pool Heap is of size 136429568 bytes
Buffer Pool Heap is of size 950272 bytes
Buffer Pool Heap is of size 786432 bytes
Buffer Pool Heap is of size 138608640 bytes
Buffer Pool Heap is of size 655360 bytes
Buffer Pool Heap is of size 393216 bytes
Buffer Pool Heap is of size 262144 bytes
Buffer Pool Heap is of size 196608 bytes
Lock Manager Heap is of size 85147648 bytes
Database Heap is of size 7438336 bytes
Other Memory is of size 0 bytes
Total: 767574016 bytes
Is there any correlation between the two?
My general concept is to figure out, on a multi db2 instance box, the
total amount of memory used by db2. I am going through each instance
and running the db2mtrk command. and grabbing the Total bytes line for
the instance and the active databases ultimatedly aggregating for the
entire box.

my two commands are actually:

db2mtrk -i -d -v | egrep '^Memory|Total:' |perl -ane 'BEGIN {$sum=0;}
$sum+=$1 if (/Total: (\d+) /); END {print "Total: ${sum}\n"; };'

and

ipcs -mb |awk '/db2iadm/{sum+=$7}END{print sum/(1024*1024)}'

TIA,

Kermit
kermit dot lowry at s1 dot com

Nov 20 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

tr*********@yahoo.com wrote:
I am running the following commands on an AIX 5.2 server, using db2 udb
v8.2.2.
my ipcs -mb command gives me the following:
IPC status from /dev/mem as of Mon Nov 20 12:47:25 EST 2006
T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0xffffffff --rw-rw---- root system 4096
m 1 0xffffffff D-rw-rw-rw- db2inst1 db2iadm1 140665792
m 70254596 0x0d00055c --rw-rw---- root system 1440
m 400556038 0x9efe1774 --rw-rw-rw- dbi1327 db2iadm1 140665792
m 211812360 0xffffffff D-rw-rw-rw- db2inst1 db2iadm1 140665792
m 573571084 0xffffffff --rw------- dbi1327 db2iadm1 245284864
m 697303053 0x9efe1761 --rw------- dbi1327 db2iadm1 29163520
m 973078544 0xffffffff --rw------- dbi1327 db2iadm1 1342177280
m 75497489 0xffffffff D-rw------- db2fenc1 db2fadm1 245284864
m 704643090 0x39220c68 --rw-rw---- db2inst1 db2iadm1 184549376
m 140509203 0x39220b74 --rw-rw-rw- db2inst1 db2iadm1 140665792
m 402653204 0x39220b61 --rw------- db2inst1 db2iadm1 29163520
m 449839126 0xffffffff --rw------- db2fenc1 db2fadm1 245284864
m 845152279 0xffffffff --rw------- db2inst1 db2iadm1 131072
and my db2mtrk -i -d -v command :

dbi1327@ep2pcdb14 db2mtrk -i -d -v
Tracking Memory on: 2006/11/20 at 13:00:53

Memory for instance

Database Monitor Heap is of size 212992 bytes
Other Memory is of size 1392640 bytes
Total: 1605632 bytes

Memory for database: DB1327PP

Backup/Restore/Util Heap is of size 131072 bytes
Package Cache is of size 7208960 bytes
Catalog Cache Heap is of size 2555904 bytes
Buffer Pool Heap is of size 42352640 bytes
Buffer Pool Heap is of size 84606976 bytes
Buffer Pool Heap is of size 8552448 bytes
Buffer Pool Heap is of size 69320704 bytes
Buffer Pool Heap is of size 43368448 bytes
Buffer Pool Heap is of size 138608640 bytes
Buffer Pool Heap is of size 136429568 bytes
Buffer Pool Heap is of size 950272 bytes
Buffer Pool Heap is of size 786432 bytes
Buffer Pool Heap is of size 138608640 bytes
Buffer Pool Heap is of size 655360 bytes
Buffer Pool Heap is of size 393216 bytes
Buffer Pool Heap is of size 262144 bytes
Buffer Pool Heap is of size 196608 bytes
Lock Manager Heap is of size 85147648 bytes
Database Heap is of size 7438336 bytes
Other Memory is of size 0 bytes
Total: 767574016 bytes
Is there any correlation between the two?
My general concept is to figure out, on a multi db2 instance box, the
total amount of memory used by db2. I am going through each instance
and running the db2mtrk command. and grabbing the Total bytes line for
the instance and the active databases ultimatedly aggregating for the
entire box.

my two commands are actually:

db2mtrk -i -d -v | egrep '^Memory|Total:' |perl -ane 'BEGIN {$sum=0;}
$sum+=$1 if (/Total: (\d+) /); END {print "Total: ${sum}\n"; };'

and

ipcs -mb |awk '/db2iadm/{sum+=$7}END{print sum/(1024*1024)}'

TIA,

Kermit
kermit dot lowry at s1 dot com
Hi Kermit,

The rough correlation between the two is that the ipcs output will be
an upper bound on shared memory consumption, but db2mtrk will report on
the current usage of that shared memory. If DB2 hasn't touched all the
pages in a shared memory segment, then on AIX, no physical memory or
paging space is consumed for those untouched pages (this behaviour
varies by platform).

db2mtrk will also give you private memory consumption by db2 agents,
which can amount to a significant total amount of memory depending on
your configuration.

If you haven't already done so, you should check out the following
article that gives a good overview of the DB2 memory model:

http://www-128.ibm.com/developerwork...6qi/index.html

Cheers,
Liam.

Nov 21 '06 #2

P: n/a
Thank you very much.

Nov 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.