Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does enabling JMX agent have a performance overhead?

Tags:

I would like to have a possibility to use jconsole in production, but am a bit concerned about performance. Is it ok to leave JMX agent running (via -Dcom.sun.management.jmxremote) or will it have a noticeable performance footprint?

like image 434
azerole Avatar asked Jul 21 '10 12:07

azerole


People also ask

Is JMX enabled by default?

Local JMX access If you are using a Java SE 6 or later JVM, local JMX management and monitoring are most likely enabled by default.

What is a JMX agent?

A Java Management Extensions (JMX) agent is a management entity that runs in a Java Virtual Machine (Java VM) and acts as the liaison between the MBeans and the management application. The various components of a JMX agent are outlined in the following sections: "MBean Server"

What is JMX and how it works?

JMX technology provides a component-based architecture for developing solutions to monitor and manage your applications, services, and resources. JMX technology is the way to instrument any application or service that was built using Java technology.


2 Answers

In general running the JVM with JMX enabled does not incur in appreciable performance hits. The performance hit happens only when a tool like jconsole is connected and actually polling for information.

See the below link for more details:

  • https://community.oracle.com/blogs/emcmanus/2006/07/21/how-much-does-it-cost-monitor-app-jconsole
like image 91
Marvan Avatar answered Sep 20 '22 13:09

Marvan


From Tuning Your GlassFish – Performance Tips :

General Tuning Tips

Unused features could have a negative impact on the performance and should be disabled:

  • Auto-deployment of applications

  • JMX Monitoring

  • JMS

  • Dynamic JSP reloading

  • JDBC Connection validation

  • Security Manager could be turned off if the applications are all trusted internal applications

Source: http://wiki.glassfish.java.net/attach/GlassFishDay2008Hyderabad/GlassFishDay2008PerfPreso.pdf (PDF document)

like image 3
bakkal Avatar answered Sep 23 '22 13:09

bakkal