47

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.

Peter
  • 29,498
  • 21
  • 89
  • 122
  • Consider https://github.com/jvm-profiling-tools/async-profiler. It's built-in into IDEA too: https://www.jetbrains.com/help/idea/cpu-profiler.html. – Vadzim Sep 03 '19 at 18:05

10 Answers10

21

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

Behrang
  • 46,888
  • 25
  • 118
  • 160
  • We did try Yourkit sometime ago, at version 7.x, and found it slowed down the JVM by an order of magnitude when profiling was on. Do their newer version use better Java 1.6+ integration and eliminate this problem? – Peter Aug 27 '10 at 18:00
  • It still slows down the JVM but it has improved a lot since then. – Behrang Aug 28 '10 at 08:00
  • I read the current feature set - if it is not misleading this is exactly what I am after. – Peter Aug 31 '10 at 20:12
15

Java VisualVM is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications) while they are running on a Java Virtual Machine (JVM). Java VisualVM organizes JVM data that is retrieved by the Java Development Kit (JDK) tools and presents the information in a way that enables you to quickly view data on multiple Java applications. You can view data on local applications and applications that are running on remote hosts. You can also capture data about the JVM software and save the data to your local system, and view the data later or share the data with others. This comes with Oracle JDK it self...

$ jvisualvm 
Prabath Siriwardena
  • 5,891
  • 1
  • 27
  • 34
11

I have been happy with jProfiler.

brettw
  • 10,664
  • 2
  • 42
  • 59
4

I prefer Java Flight Recorder. It causes almost no performance overhead and has a nice GUI. Add JVM parameters

-XX:+UnlockCommercialFeatures -XX:+FlightRecorder

-XX:StartFlightRecording=name=test,filename=test.jfr,dumponexit=true

and open the record with JMC.

jun
  • 51
  • 1
2

Checkout CA Wily.

http://www.ca.com/us/application-management.aspx

Kumar225
  • 227
  • 1
  • 5
  • 13
  • We had Wily threads running out-of-control consuming 2 GB of heap per second at a very major customer, causing critical performance problems and failures. At other sites we have used AppDynamics which has worked well. – Thomas W Nov 30 '17 at 21:41
1

There's another new option called javosize

When I looked for "best java profiler" on google, I saw on the first non-paid link (it's a blog), the same tool on the comments to the post:

https://blog.oio.de/2014/03/07/java-profilers-a-short-comparison-between-jprofiler-yourkit-and-javas-visualvm/

Hope it helps!

Edit: As comments say, linkedin link is to a private forum. Sorry for it. Here is the link to main site:

http://www.javosize.com/gettingStarted.html

Jorge Zazo
  • 11
  • 2
  • that linked-in link is just a link to a group, not to a specific post. Is it broken ? – bvdb Jun 30 '15 at 11:38
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Wouter Jun 30 '15 at 11:44
  • You both are right, sorry for the inconveniences. Another link to main page added. Sorry again. – Jorge Zazo Jun 30 '15 at 14:01
1

I use Eclipse TPTP - Eclipse Test & Performance Tools Platform Project. Whether it is suitable for production use or not, it depends on the user. For me, it's fine and it does meet your needs.

http://www.eclipse.org/tptp/

eee
  • 1,043
  • 7
  • 5
1

FusionReactor Java Application Performance Monitor, also includes a very low overhead Java Profiler as part of its feature portfolio. http://www.fusion-reactor.com/production-java-profiler/ FusionReactor can be installed in a couple of minutes & they have a free 14 day trial to test it out.

1

Take a look at Java Mission Control in conjunction with Flight Recorder. Starting with the release of Oracle JDK 7 Update 40 (7u40), Java Mission Control is bundled with the HotSpot JVM, so it is highly integrated and purports to have small effects on run-time performance. It has call tree functionality like Callgrind.

Muxiang Yang
  • 71
  • 1
  • 3
1

Another option is http://www.newrelic.com/. We have been using it in production for some time, and it seems to be pretty reliable and performant. Simple to setup (one .jar and a -agent commandline option).

magbyr
  • 71
  • 1
  • 7