Take the 2-minute tour ×

How can we increase the performance of an application. My application is written using Java, Hibernate, Servlets, Wsdl i have used for web services. I have executed some of the tests on linux machine, so that i can get proper TPS of the execution.

but still , i am not satisfied by the performance.

So for this, what all steps i should try to increase the performance.

adding to above, i have executed code coverage and used find bugs in the code prominently for each and every test and every service i have written.

Individual suggestions are invited.


share|improve this question
Well, if you are not satisfied with the performance, did you attempt to find out where it was unsatisfactory. I'm afraid that statement of yours came out like a rant. –  Vineet Reynolds Jun 14 '11 at 10:50
What exactly did you do to measure the performance? Is there any specific performance issues you are trying to resolve? What exactly does your application do? –  abalogh Jun 14 '11 at 10:52
add comment

3 Answers

up vote 3 down vote accepted

Profile your application, and remove all of your bottlenecks.

In addition, or better before, take a day or two and read as much from the Java Performance Tuning newsletters as you understand.

share|improve this answer
add comment

You should monitor your application with a tool like VisualVM, JProfiler etc. to determine the performance bottleneck(s). It is pointless to tune the application without knowing where the actual performance problems are located.

In a professional environment, I suggest dynaTrace that can show you performance bottlenecks along the execution path. The tool can show you exactly where the application spends its time.

share|improve this answer
I have used VisualVm to figure out, how much time is taken by each and every critical service and database hits. With those stats, i can say that i am somewhat happy with service but unhappy with database hits. –  M.J. Jun 14 '11 at 11:12
At least you found out what to tune. Database tuning guides are avaiblable for all major databases. Sometimes creating a missing index is enought for a problem. –  Daniel Jun 14 '11 at 13:02
For instance, http://stackoverflow.com/questions/2980359/web-page-database-query-optimization‌​ includes some proposals to decrease the hit number. In general, I would suggest caching as a good way to reduce the database hit number. –  s106mo Jun 14 '11 at 19:34
add comment

Is the performance related to disk I/O or network I/O? In a high throughput system (from DB point of view) Hibernate might not be the best way to go. If you have a lot of writes I would recommend you use a different mechanism to write to database -- perhaps simply switching to simple JDBC might speed it up? Secondly, is it the case that your webservices are taking too long to get back with results? SOAP is not the fastest protocols really -- have you looked at something like REST maybe coupled with JSON ?

share|improve this answer
For servlet to service execution flow, i am using JSON only. I am using wsdl in case when other system is invoking some of my service. –  M.J. Jun 14 '11 at 11:13
and have you measured the network trip for each request, JSON or WSDL? –  Liv Jun 14 '11 at 11:14
network, as in JSON i have figured out, but how can we measure for WSDL? –  M.J. Jun 14 '11 at 11:30
use some timers in your code and record the time it takes from the moment you make the call till your result comes back. –  Liv Jun 14 '11 at 11:30
I should add -- you could use something like JETM for this: jetm.void.fm –  Liv Jun 14 '11 at 11:32
add comment

Your Answer


