Solved

Memory footprints on application

Posted on 2008-10-21
8
1,055 Views
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
0
Comment
Question by:Gurinders
  • 4
  • 4
8 Comments
 
LVL 10

Expert Comment

by:jinn_hnnl
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
http://www.skywayradio.com/tech/WAS51/TPV.php

JINN
0
 

Author Comment

by:Gurinders
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.

Thanks.
0
 
LVL 10

Accepted Solution

by:
jinn_hnnl earned 500 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.
http://www.ibm.com/developerworks/websphere/library/techarticles/0706_sun/0706_sun.html

Hope this helps

JINN



0
 
LVL 10

Expert Comment

by:jinn_hnnl
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

JINN

large-free-space-when-AF.jpg
free-spaces.jpg
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Gurinders
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.
0
 
LVL 10

Expert Comment

by:jinn_hnnl
ID: 22794243
Well,

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.

JINN
0
 

Author Comment

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

Thanks for your help and sollutions.
0
 

Author Closing Comment

by:Gurinders
ID: 31508580
Thanks!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
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…
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…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now