Db2

 View Only
  • 1.  DB2 LUW memory value

    Posted Mon August 21, 2023 11:25 AM

    Is it possible to get a accurate memory value at any point in time in DB2 LUW?



    ------------------------------
    Raghavendra C
    ------------------------------


  • 2.  RE: DB2 LUW memory value

    Posted Tue August 22, 2023 04:29 AM

    Hi Raghavendra,

    what information do you look for exactly? Instance memory use, database memory use, heap allocation, bufferpool size...  ;-)

    You might want to try 'db2pd -dbptnmem' as a general overview of memory consumption of your instance and the active databases. Also 'db2 get dbm cfg show detail' and 'db2 get db cfg for mydbname show detail' can help you to get the configured and currently in use configuration values.

    With 'db2pd' you can check out much more low-level details of the current instance running. Have a look at the knowledge center at https://www.ibm.com/docs/en/db2/11.5?topic=commands-db2pd-monitor-troubleshoot-db2-engine-activities

    My favourite is 'db2pd -edus interval=10 top=20' to find the busiest database and connection on a multi database server. ;-)

    Cheers



    ------------------------------
    Roland Schock
    IBM Champion and IBM Gold Consultant
    ------------------------------



  • 3.  RE: DB2 LUW memory value

    Posted Thu August 24, 2023 10:25 AM

    I guess db2top would do the trick !



    ------------------------------
    Youssef Sbai Idrissi
    Software Engineer
    ------------------------------



  • 4.  RE: DB2 LUW memory value

    Posted Fri August 25, 2023 01:27 AM

    Well, db2top was given up in newer versions. The replacement dsmtop has a serious disadvantage of needing a JDBC connection to a database on the system. Db2top was directly accessing memory pages and the data stored there.

    The next utility dmc also requires a connection to the database.

    For an external consultant it is crucial that the tools are already present on the machine (db2pd, dsmtop), and do not need to be installed first (dmc).



    ------------------------------
    Roland Schock
    IBM Champion and IBM Gold Consultant
    ------------------------------



  • 5.  RE: DB2 LUW memory value

    Posted Fri August 25, 2023 03:10 AM
    Edited by Jan Nelken Fri August 25, 2023 03:15 AM

    In addition to your excellent reply, Roland - let mi just highlight one aspect: original poster was asking for get a accurate memory value at any point in time.
    Not questioning sense of such request - it excludes tools which require connection to a database - therefore activation of the database.
    Db2pd, deprecated db2mtrk and MON_GET_MEMORY_POOL and/or the MON_GET_MEMORY_SET table functions (if connection to database is acceptable) appear to be only tools of trade available. 



    ------------------------------
    Jan Nelken
    ------------------------------