As I posted in Performance drop after 5 days running web application, how to spot the bottleneck? , I have a problem with an application that gets slow after running for a while.
I got VisualVM running and made a snapshot between different times. Now the application is really slow, but I have no idea how to spot the bottleneck. They don't have many differences between each other and the only thing that grows a bit is the Heap, which is successfully garbage collected after a while.
Can anyone give me some pointers?
Here are the snapshots (apps):
[1] http://www.2shared.com/file/W4XJ6HtE/application-1314108550032.html
[2] http://www.2shared.com/fadmin/22521338/f512f97e/application-1314097232727.apps.html
Thank you!
EDIT: Looking closer, I've noticed that the CPU is not even being used much.. and the system is really slow!
As a first step I would suggest to identify what exactly is slow. Does it execute some job slowly? Or demonstrates low throughput on handling jobs from different clients?
What resource is unsufficient?
As you have identified which resource is unsufficient and the part of your program which suffers from it you could try to find the piece of code to optimize. Taking a random tool and run your application through it without knowing what to look for makes no sense.
From my personal experience it is very rare case when you have just a slow method, which could be found with a profiler. Most likely it is an unexpected IO and/or synchronisation somewhere in your algorithm or bad database schema.
Actually, there are some better tools than VisualVM.
You could try JProfiler, which is a nice profiler (but paid)
And you could try the Netbeans profiler, which is free and works great
With VisualVM you'll only see the actual state of your application (memory and cpu usage, JMXs, classes loaded, etc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With