用于生产的最佳和最安全的 Java Profiler?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3571166/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 01:56:54  来源:igfitidea点击:

Best and safest Java Profiler for production use?

javaprofilingprofilerproduction-environment

提问by Peter

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:

我正在寻找一个 Java Profiler,用于在需求非常高的生产环境中使用,无论是商业的还是免费的,它满足以下所有要求:

  • 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.
  • 与代码的轻量级集成(无需使用特殊选项重新编译,无需代码挂钩等)。在应用程序代码旁边删除一些分析器特定的 .jar 文件是可以的。
  • 应该能够在不重新启动应用程序的情况下连接/断开与 JVM 的连接。
  • 当分析不活跃时,对性能没有影响
  • 当分析处于活动状态时,对性能的影响可以忽略不计。非常轻微的退化是可以接受的。
  • 必须完成分析器所做的所有“预期”工作——在每种方法中花费的时间来查找热点、对象分配/内存分析等。

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.

本质上,我需要一些可以在一切正常而没有人知道或关心它在那里的情况下在生产中处于休眠状态的东西,但随后能够轻松连接到它(和性能下降)以查明难以发现的问题,例如热点和同步问题。

采纳答案by Behrang Saeedzadeh

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

你试过YourKit吗?它几乎具有您正在寻找的所有功能。

回答by eee

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.

我使用 Eclipse TPTP - Eclipse 测试和性能工具平台项目。是否适合生产使用,取决于用户。对我来说,这很好,它确实满足了您的需求。

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

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

回答by brettw

I have been happy with jProfiler.

我对jProfiler满意

回答by magbyr

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).

另一种选择是http://www.newrelic.com/。我们已经在生产中使用它有一段时间了,它似乎非常可靠和高性能。设置简单(一个 .jar 和一个 -agent 命令行选项)。

回答by Prabath Siriwardena

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...

Java VisualVM 是一种工具,它提供了一个可视化界面,用于在基于 Java 技术的应用程序(Java 应用程序)在 Java 虚拟机 (JVM) 上运行时查看有关它们的详细信息。Java VisualVM 组织由 Java 开发工具包 (JDK) 工具检索的 JVM 数据,并以一种使您能够快速查看多个 Java 应用程序数据的方式呈现信息。您可以查看有关本地应用程序和在远程主机上运行的应用程序的数据。您还可以捕获有关 JVM 软件的数据并将数据保存到本地系统,以便稍后查看数据或与他人共享数据。这是 Oracle JDK 自带的...

$ jvisualvm 

回答by Jorge Zazo

There's another new option called javosize

还有一个新选项叫做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:

当我在谷歌上寻找“最佳 Java 分析器”时,我在第一个非付费链接(它是一个博客)上看到了帖子评论中的相同工具:

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

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:

编辑:正如评论所说,linkedin 链接是一个私人论坛。对不起。这是主站点的链接:

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

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

回答by jun

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

我更喜欢Java Flight Recorder。它几乎不会造成性能开销,并且有一个很好的 GUI。添加JVM参数

-XX:+UnlockCommercialFeatures -XX:+FlightRecorder

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

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

and open the record with JMC.

并用 JMC 打开记录。

回答by David Tattersall

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.

FusionReactor Java Application Performance Monitor 还包括一个开销非常低的 Java Profiler 作为其功能组合的一部分。 http://www.fusion-reactor.com/production-java-profiler/FusionReactor 可以在几分钟内安装,他们有 14 天的免费试用期来测试它。

回答by Muxiang Yang

Take a look at Java Mission Controlin 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.

结合Flight Recorder 来看看Java Mission Control。从 Oracle JDK 7 Update 40 (7u40) 的发布开始,Java Mission Control 与 HotSpot JVM 捆绑在一起,因此它高度集成并且声称对运行时性能的影响很小。它具有类似于 Callgrind 的调用树功能。