启用JConsole远程监控是否会影响生产中的系统性能?

发布于 2024-11-18 14:25:37 字数 366 浏览 8 评论 0 原文

Oracle/Sun 说只要不在生产环境中本地运行就可以吗? http://download.oracle.com/javase/1.5.0/docs/指南/管理/jconsole.html

注意:使用 jconsole 监视本地应用程序对于开发和原型设计很有用,但不建议用于生产环境,因为 jconsole 本身会消耗大量系统资源。建议远程监控,将jconsole应用程序与被监控的平台隔离。

您是否曾经在生产环境中启用过它并经历过任何性能影响?

Oracle/Sun says its fine as long as you don't run it locally on production box?
http://download.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html

Note: Using jconsole to monitor a local application is useful for development and prototyping, but is not recommended for production environments, because jconsole itself consumes significant system resources. Remote monitoring is recommended to isolate the jconsole application from the platform being monitored.

Have you ever enabled it in a production environment and experienced any performance impacts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清秋悲枫 2024-11-25 14:25:37

选项启用没有身份验证或加密的远程 jmx 几乎没有性能影响:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9999 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.remote.ssl=false

如果您打开 SSL 并强制身份验证,则会有更多的性能成本:

-Dcom.sun.management.jmxremote.authenticate=true 
-Dcom.sun.management.remote.ssl=true
-Dcom.sun.management.jmxremote.password.file=jmxremote.password

尽管在生产环境中强烈不建议这样做,但通过以下 2 个场景将仅在生产 JVM 中启动 mbean 服务器和 RMI 连接器服务器。远程连接到该 JVM 的成本会更高,但这完全取决于您观看的视图(例如 GC 视图需要收集所有数据并将其传输回 jConsole 客户端,这不是免费的)以及您执行的操作远程调用。

您可以从以下博客文章中阅读更多统计信息:

Although it is highly not recommended in a production environment, there is little to no performance implications to enabling remote jmx with no authentication or encryption via options like these:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9999 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.remote.ssl=false

There is a little more performance cost if you turn on SSL and mandate authentication:

-Dcom.sun.management.jmxremote.authenticate=true 
-Dcom.sun.management.remote.ssl=true
-Dcom.sun.management.jmxremote.password.file=jmxremote.password

The above 2 scenarios will only start an mbean server and an RMI connector server in your production JVM. Connecting to this JVM remotely will be more expensive, but it all depends on what views you watch (e.g. GC views require all that data to be collected and transported back to the jConsole client, which is not free), as well as the operations you invoke remotely.

You can read more statistics from the following blog post:

蓝梦月影 2024-11-25 14:25:37

您可以使用 jconsole 使用公开的 JMX 端口远程连接到生产服务器...但是,在不同的环境中复制该场景总是更好。在那里运行 jconsole...

you can use jconsole to remotely connect to a production server using the exposed JMX ports... however its always better to replicate the scenario in a different environment & run jconsole there....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文