I'm considering to profile a production environment with Java Visual VM. I want to montitor:
Does this monitoring have any significant impact to the performance of the JVM?
In my experience there is no noticable slowdown unless you are using the profiler. With the profiler-mode, it is a matter of your filter, whether the performance-impact is notable or not. The sampler is a much safer choice, however you have to be aware, that enabling either will trigger some hot-code-replacement which renders the system unusable for a short amount of time (and may also trigger that one: JDK7 Application is getting slow after some Uptime).
Of course, if you simply want to get basic info (memory, cpu-graph, gc and thread-count) the impact will be even lower.
How certain am I with my answer? I've been using JVisualVM, JProfiler and YourKit for almost 10 years by now. We have used sampling/monitoring mode in yourkit (which does basically the same thing than jvisualVM) in production code (a regular web-app) of our customers to analyze performance bugs. It did not have any noticable impact.
However, if you only need basic system monitoring, there might be more suitable products to consider like java melody (https://github.com/javamelody/javamelody/wiki) or kieker (http://kieker-monitoring.net/).
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