Memory footprints on application

I have to enterprise applications sharing the same JVM's. We are experiencing performance issues on one of the environment. Is there any way we can figure out how heap usage by one particular application since both the applications are running on same appservers.

WebSphere Version - WAS 6.1
OS - Solaris 9
Who is Participating?
My apology for late response, I was out of office.

Back to your problem, first of all, I would recommend you to experiment the performance test on a development server (I bet you do have), may be you dont have the speed problem on development server due to the less amount of request. But you can increase them up to and amount of 4000, this should be enough to simulate like the production server.

Is that your case: when 2 applications run simultaneously, one of them gets slow down, is that always one specific application or is that sometimes application A, sometimes application B.

These issues below are kind of easiest steps you can perform, with 2 applications, I suggest you run each of them individually (after perform enough requests for both that can leads to memory leak).
 At a certain point, when everything slow down, stop one and check another, check the presummably large object and memory problem, then DO the same for another, one at a time, keep the report and compare. You will surely find the difference.

To detect large object you can use several method, one of them is Analyzing fragmentation:
- Tuning the max heap size
- Tuning Xk/Xp
- Identifying by swprofiler: To identify the large object problem, This tool helps you print the stack information of an object by setting the allocation limit and depth

Performing the heap dump:
This let you to resolve when  memory leak after GC declined, you can use IBM® HeapDump, a utility shipped with the IBM JDK. It lets you dump all the living objects in the Java heap into a text file called heapdump. This tool analyzes the memory usage of every Java object. This is a step to find which of them are consuming JVM space. One thing is for different OS they have different command to dump.

I dont know if you have tried any another solutions, but here what you can find each steps I mention, purposes and solutions. This link provide more information and in another area too.

Hope this helps


It's understandable if you have memory heap problem in this case.

You can use
 Tivoli® Performance Viewer helps to find memory leaks. For best results, repeat experiments with increasing duration, such as 1000, 2000, and 4000-page requests.

 Also, look at the difference between the number of objects allocated and the number of objects freed. If the gap between the two increases over time, there is a memory leak.
 If heap consumption indicates a possible leak during a heavy workload (the appserver is consistently near 100% CPU utilization), yet the heap appears to recover during a subsequent lighter or near-idle workload, this is an indication of heap fragmentation. Heap fragmentation can occur when the JVM is able to free sufficient objects to satisfy memory allocation requests during garbage collection cycles, but the JVM does not have the time to compact small free memory areas in the heap into larger contiguous spaces.  

For more information

GurindersAuthor Commented:
Thanks for replying.
This is a production environment and I won't be able to use TPV on it.

"Also, look at the difference between the number of objects allocated and the number of objects freed. If the gap between the two increases over time, there is a memory leak. "

Since my two enterprise applications are sharing the same JVM's, how can I find that from which application the objects are allocated and freed up..

Can you please throw some more light on it.

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Some pic to give you an idea what could happen. Even you run individually 2 applications, you will find each of them what kind of problem you faced. Each can create large object or have inappropriate cache sizes (for example). Doesn't matter which, but you gotta solve it individually to eliminate the problem


GurindersAuthor Commented:
Thanks for valuable solutions.

Well l want to tell you some more information. My apologies, I think my question was not complete.
As I mentioned earlier, there are two applications running, like A and B.
Application A is running successfully for more than 2 years without any troubles. A month before we deployed an other application, here it is "B"  and only B application have performance issues.
As suggested ahead I can take heap dumps on Test environment can figure out the heap usage.
In the mean time if you have anything else in your mind, please update me with that.

Thanks and I appreciate your replies.

I think you will find at which request and what type of objects causes the memory leak, there are solutions in the article I gave, it will do.

Another suggestion I would like to mention is, the problem might even came from your first application which was fine before. This application might generated unnecessary large objects and causes the problem, or doesn't have sufficient cache settings. It was fine due to server availabilities back then, but as soon as the JVM is shared with another, these critical part appears to be the problem.

For timing issues, you can focus on analyzing the 2nd application, after you done, I recommend to do the same test for the 1st to have even better view for refactoring and clean up your source code.

GurindersAuthor Commented:
I apologies for this late reply.
I resolved the issue by separating the JVM's.

Thanks for your help and sollutions.
GurindersAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.