Categories
Performance Testing

Performance – Profiling Java Application

 

screenshot

 

 

 

 

 

 

 

These are the steps for profiling java application.

1) Take heap dump
For taking heap dump without using a profiler refere the below link
https://www.technix.in/taking-java-heap-dump/
2) Analyze the live objects list and find out the leaking objects .
3) If the objects are found that to be leaked , delete those leaked objects and retest the scenario.
4) If there are no objects leaking found, then take thread dump and continue the analysis.
5) Find out whether thread creation is increasing over time.
6) If threads are more in number , it will consume more memory , server resources and also source of deadlock , hence use Thread Profiling for the services and make it under control


If the slowness is due to neither threads nor heap objects, then what should be done?

Solution: Enable DB slow query log , dead lock traces and monitor Database server.

Is there any other tip to ensure that application issue is caused by DB server Query Execution other than finding from logs?
Solution: Yes, Monitor the CPU consumption , It will go to Peak when the issue is due to Query Execution.

Is there any open source profilers?
Yes, there are plenty of tools available for profiling. You can use Jconsole, JvisualVM,Netbeans profiler etc..

One reply on “Performance – Profiling Java Application”

Clean Article!

High CPU Consumption (or consuming more Virtual Cores) can occur due to RUNNABLE/RUNNING threads, caused by improper application coding logic like executing infinite loop, trying to read from empty arrays..etc

Leave a Reply

Your email address will not be published. Required fields are marked *