0

I am using JAMON for application analysis.

My websphere administrator has reported memory leakage in the application. And to my surprise most of the memory leakage is reported in JAMON API.

Scenario is that, our production memory usage keep on increasing with time. After one month it has reached 80%. And not decreasing with time. I am using Alphawork Heap analyzer to analyze heap dump.

How can I be sure that suspected memory leakage is actually a memory leakage.

user3647434
  • 69
  • 1
  • 4

1 Answers1

1

JAMon is backed by a java Map, so anything that causes its keys to grow unbounded in number or size could cause memory problems. So here are some things to look at.

  • How many monitors do you have? Using keys that contain ever changing information such as a timestamp or arguments to a function will make the number of jamon monitors grow. (MonitorFactory.getNumRows())
  • How big are your keys (i.e. the labels that you are monitoring)? Once i saw some very large strings used as keys (select statements with large 'in' clause and that consumed a lot of memory.

If the above are problems here are some methods that can help you.

  • Limit the number of monitors with - MonitorFactory.setMaxNumMonitors(int)
  • Limit the size of the largest sql statement - MonitorFactory.setMaxSqlSize(int)
  • Track total key size in jamon - MonitorFactory.enableTotalKeySizeTracking()
  • Get the total keysize in jamon (note it will also be seen in the jamon web application) - MonitorFactory.getTotalKeySize()
  • From the jamon web application you can select 'Reset' the jamon stats from jamonadmins.jsp to wipe out the jamon data and so free all the memory as a quick fix. You can do this programmatically too by calling MonitorFactory.reset()