| Author |
Cause of an application running slow in java ?.
|
Praveen Kumar
Ranch Hand
Joined: Nov 06, 2006
Posts: 133
|
|
Hi Ranchies,
Recently I faced one interview question " Suppose if the application performance is slow, how you will troubleshoot and what things you will trouble shoot first".
I replied with DB normalization and JVM. I told we can some tools like Jprofile and Jmeter
Please let me know how we will troubleshoot and what are the available tools to do that one.
Thanks
Praveen
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 10043
|
|
|
you should always use a profiler first. It will tell you where you application is really slow, letting you focus on what is really needed.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
steve souza
Ranch Hand
Joined: Jun 26, 2002
Posts: 852
|
|
If I asked this question I would want to hear the candidate answer it in a scientific well thought out manner. If they quickly said all the things they would change about their code without properly emphasizing their knowledge of profiling, and an understanding that premature optimization is a sin, then in my view they have failed the question.
Profiling the code is the first step. I would elaborate on how you would do this (for example what tools and approach you would use to prove that you have done it before). I would then add doing any steps like DB normalization is premature, until you have found your bottlenecks, and explain why. You should tune where the profiling leads you. Having made it clear you just don't start tuning without evidence, you could then add typical performance improvement areas. IO subsystems such as the database, file, network are typically prime candidates for performance problems. You could add some examples of how you could detect and improve each of these. An example of a database check that can help a lot is to ensure that your tables have the proper indexes.
|
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
|
 |
 |
|
|
subject: Cause of an application running slow in java ?.
|
|
|