Best and safest Java Profiler for production use?

Peter picture Peter · Aug 26, 2010 · Viewed 23.7k times · Source

I'm looking for a Java Profiler for use in a very high demand production environment, either commercial or free, that meets all of the following requirements:

  • Lightweight integration with code (no recompile with special options, no code hooks, etc). Dropping some profiler specific .jars alongside the application code is ok.
  • Should be able to connect/disconnect to the JVM without restarting the application.
  • When profiling is not active, no impact to performance
  • When profiling is active, negligible impact to performance. Very slight degradation is acceptable.
  • Must do all the 'expected' stuff a profiler does - time spent in each method to find hotspots, object allocation/memory profiling, etc.

Essentially I need something that can sit dormant in production when everything is fine without anyone knowing or caring that it is there, but then be able to connect to it hassle (and performance degradation) free to pinpoint the hard to find problems like hotspots and synchronization issues.

Answer

βξhrαng picture βξhrαng · Aug 26, 2010

Have you tried YourKit? It has almost all of the features you are looking for.