DX Application Performance Management

  • 1.  Monitoring code cache size

    Posted Jul 10, 2014 04:40 PM

    All,

     

    I'm using 9.1.1.

     

    I'm interesting in monitoring the size of my code cache.

     

    There are a couple of ways to approach this.

     

    I would prefer to tweak what shows up under GC Monitor|Memory Pools.  There are 5 MBeans of type MemoryPool in my JVM and 4 of them show up in the Investigator under GC Monitor|Memory Pools.  I just need to make the 5th one show up also but don't know how.

     

    Instead, I can edit the jmx filter to include it somehow.  The value is the "used" element of the "Usage" attribute of java.lang:type=MemoryPool,name=Code Cache.  Usage is a CompositeData object, like java.util.Map, with 4 elements in it.  I want the value for key "used."  I can't figure out the syntax for referencing that value.

     

    I can't find anything like this in the docs, nor could I find where the existing Memory Pool data is configured in the various OOTB pbd files.

     

    thanks



  • 2.  Re: Monitoring code cache size

    Posted Jul 10, 2014 06:28 PM

    You might be interested in up-voting this idea, here: Java Stack Space and Code Cache Monitoring



  • 3.  Re: Monitoring code cache size

    Posted Jul 11, 2014 02:31 AM

    and in case you have additional ideas for GC monitor - comment here: What else is missing for GC Monitor

     

    and regards the JMX mess a other idea to possibly vote on New JMX Integration/Framework for Java Agent



  • 4.  Re: Monitoring code cache size
    Best Answer

    Posted Jul 11, 2014 02:56 PM

    I found a decent solution to this problem.  I would prefer to have this data under GC Monitor|Memory Pools like its siblings, but I found the right jmx filter settings to get it to show under JMX.

     

    Enable/uncomment this line in IntroscopeAgent.profile:

     

    introscope.agent.jmx.compositedata.enable=true

     

    Make sure your jmx keys include "type, name."  This is mine:

     

    introscope.agent.jmx.name.primarykeys=Type,Name,type,name

     

    Add the mbean to your jmx filter:

     

    MemoryPool|Code Cache:Usage

     

    If you want all 5 pools under JMX, you can probably use this instead (I haven't tried it:)

     

    MemoryPool|*:Usage

     

    After a restart, you get output like this:

     

    jmx.png

     

    The ones with parens are the actual CompositeData values I'm interested in.  The other 2 are just attributes of Code Cache that happen to begin with "Usage."