11

I am reviewing a big java application to see if there are any performance bottlenecks. The real problem is that I cannot pinpoint the performance issues to any single module. The whole application is slow as such.

Is there some tool/technique I can use to help me out in this?

Niyaz
  • 53,943
  • 55
  • 151
  • 182

6 Answers6

8

Try using a profiler on your running code. It should help you identify the bottlenecks. Try jprofiler or Netbeans profiler

Bartosz Bierkowski
  • 2,782
  • 1
  • 19
  • 18
6

I'm often happy enough using Java -Xprof. This gives you a sorted list of the functions your code spends most of its time in.

wvdschel
  • 11,800
  • 14
  • 41
  • 45
3

If you are running on Java 6 you can use the supplied monitoring tools

HadleyHope
  • 1,173
  • 1
  • 10
  • 19
0

YourKit is a excelent java profiler (not free).

peceps
  • 17,370
  • 11
  • 72
  • 79
0

As we see from How can I profile C++ code running in Linux?, the most statistically significant approach is to use a stack profiler.

Well, Java runs in the JVM, so getting a stack useful for C code won't be useful for us (it'll get the JVM stuff, not your code). Fortunately, Java has jstack! http://docs.oracle.com/javase/1.5.0/docs/tooldocs/share/jstack.html

It'll give you a bunch of threads, like the GarbageCollector. Don't worry about those, just look at where your threads are.

Community
  • 1
  • 1
Riking
  • 2,389
  • 1
  • 24
  • 36
0

For testing/development purposes, you can download Oracle JRockit Mission Control for free from this site. (Requires Login, but accounts can be set up with any email adress)

Docs Here. It will allow you to find hotspots, memory leaks and much more.

Tnilsson
  • 2,180
  • 1
  • 15
  • 22