Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Memory footprints on application

Posted on 2008-10-21
Medium Priority
Last Modified: 2012-05-05
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
Question by:Gurinders
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
LVL 10

Expert Comment

ID: 22776766
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


Author Comment

ID: 22777836
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.

LVL 10

Accepted Solution

jinn_hnnl earned 1500 total points
ID: 22783981
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


Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

LVL 10

Expert Comment

ID: 22784014
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



Author Comment

ID: 22786523
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.
LVL 10

Expert Comment

ID: 22794243

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.


Author Comment

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

Thanks for your help and sollutions.

Author Closing Comment

ID: 31508580

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question