If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Memory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-10, 14:27
blazer789 blazer789 is offline
Registered User
 
Join Date: Jun 2009
Posts: 221
Memory

Is there any way to determine how much paging space and actual memory is being used by the instance and database ?

Does the output of the db2mtrk /db2pd -dbptnmem also include the pagingspace used by the instance
Reply With Quote
  #2 (permalink)  
Old 01-20-10, 15:04
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Paging space is not used by the instance. It is used by the operating system. You will need to use OS tools to obtain virtual memory information.
Reply With Quote
  #3 (permalink)  
Old 01-21-10, 18:23
gecko1 gecko1 is offline
Registered User
 
Join Date: Jan 2010
Posts: 1
I have also been trying to match memory reported by windows to whats inuse in the database.

I've been using perfmon 'Process\Virtual Bytes[db2syscs]' to see the actucal memory used by DB2 and the following query to try and see where memory is allocated.

I'm still working on this to see how to best match things up. If anyone else has any good ideas or ways to check memory, that would be great.

Code:
SELECT 1,'InstanceMemory Curr', CURRENT_PARTITION_MEM/1024/1024 as MB, CURRENT_PARTITION_MEM/1024 as KB 
       FROM TABLE (SYSPROC.ADMIN_GET_DBP_MEM_USAGE()) AS T 
UNION
SELECT 2,'DB Mem Allocated', INT(VALUE)*4/1024 as MB, INT(VALUE)*4 as KB
       FROM   SYSIBMADM.DBCFG
       WHERE  NAME = 'database_memory'
UNION 
select 3,'DB Mem Used', SUM(POOL_CUR_SIZE)/1024/1024 as MB, SUM(POOL_CUR_SIZE)/1024 as KB
       FROM sysibmadm.snapdb_memory_pool 
       WHERE POOL_ID in ('BP','CAT_CACHE','DATABASE','LOCK_MGR','OTHER','PACKAGE_CACHE','SHARED_SORT','UTILITY') GROUP BY DB_NAME
UNION
 SELECT 4,'Appl Mem Allocated', INT(VALUE)*4/1024 MB, INT(VALUE)*4 KB
       FROM   SYSIBMADM.DBCFG
       WHERE  NAME = 'appl_memory'
UNION 
select 5,'Appl Mem Used', SUM(POOL_CUR_SIZE)/1024/1024 as MB, SUM(POOL_CUR_SIZE)/1024 as KB
       FROM sysibmadm.snapdb_memory_pool 
       WHERE POOL_ID in ('APPL_SHARED','APPLICATION') GROUP BY DB_NAME
ORDER BY 1;
Reply With Quote
  #4 (permalink)  
Old 01-21-10, 20:24
blazer789 blazer789 is offline
Registered User
 
Join Date: Jun 2009
Posts: 221
If you are in V9.5 you can try db2pd -dbptnmem for each instance and it gives the output of the current memory and the highwater mark of all the memory segments.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On