Results 1 to 4 of 4

Thread: Memory

  1. #1
    Join Date
    Jun 2009
    Posts
    272

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    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;

  4. #4
    Join Date
    Jun 2009
    Posts
    272
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •