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?
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.
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"
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.
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:
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With