cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Best way to get application memory usage of a JVM

johnroncaglione
Organizer

We have JVMs that run multiple applications.  How can I determine how much of the heap is used by each application with in the same JVM?  We would like to do this for capacity planning when a new application needs placed.

We are running Dynatrace 5.6 and the applications are running IBM J9 VM – JRE 1.6.0 and Websphere 8 on Linux server.

 

 

2 REPLIES 2

r_weber
DynaMight Pro
DynaMight Pro

John technically this is not possible as a JVM has no notion of what code or objects are responslible for which application.
Imagine you have 2 million Java String objects on the heap, how would you determine which "application" they belong to.

You could do a full heap dump at any time and run a complex analysis of where objects have been created/allocated but even then you would probably end up with internal objects of the JVM that you can't really assign to an application.

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

graeme_william1
Inactive

John,

If you chart the JVM memory along with a measure of application traffic (e.g., PurePath duration with aggregation set to count) split by application, you can export the data to Excel and with a little copying and pasting (to get the data into a neat table), you can run a regression on the data.  This might generate some useful data.

A couple of caveats ... First, you're using time-series data, to which a standard Excel regression does not, strictly speaking, apply.  This is mitigated somewhat if you choose a chart resolution large enough that the data points are independent.  I'd use 5 minutes, unless your application has long-lived state – in which case you'll need an even longer resolution.  Resist the temptation to use a shorter resolution to get more data points.

Second, you would get better results if the different applications had different peak times – but that might not be the case.  Pick a time period long enough that there is some difference in the relative load on the different applications.

-- Graeme