Menu

Need to generate a report on the memory usage

Help
2009-04-22
2013-05-13
  • Vinodkumar  Nemagouda

    Hi Suresh/Anmol,

    I have downloaded the latest version of Jensor1.9

    Requirement: Need to generate a report on the memory usage by application specific Controller objects, Backing Beans and some utility objects. This report should be generated during limited time period and then using this report we are planning to analyze

                          >> Memory consumption by each object
                          >> When the object are getting removed from the Session
                          >> Performance Bottlenecks if there are any  

    I checked for object instantiation it gives mainly how many number of objects are created but not the memory usage of objects....

    Can you please let me know whether we can achive the following requirement,

     
    • Amol Khanapurkar

      Hi,

      Jensor does not capture Object size. Calculating Object size is not as simple in Java as in C where one has a sizeof() operator. That makes calculating Object sizes and expensive operation. Jensor does not do it.

      There are a couple of ways to get object sizes. You can take a heap dump and analyze it using tools like HAT, VisualVM, HeapAnalyzer etc.

      Have you tried Tagging Engine and Response Time Spectrum? They should give you additional details regarding response time performance.

      Finally, the memory reports that you wish to capture is best done through your own code (assuming you have access to source code) and having it logged to a file. If you want profiler to do you wish to see in the report, it will make your application run extremely slowly becuase of the following tentative activities that it will need to do.

      1) Capture every Object that gets instantiated.
      2) Check if the Object type is the same as what you are interested in.
      3) Maintain references to your objects (this itself will distort memory consumption picture)
      4) Update statistics upon every object getting allocated and deallocated.

      I suggest logging in your code or periodic heapdumps as viable means of getting information you are looking for.

      -Amol

       

Log in to post a comment.