Hi Kevin
I have definitely had Yourkit profiler running in Production without significant issues, for 1-2 weeks at a time, for moderate volume "web service" style services (where SLAs are measured in seconds). As usual, I'd suggest testing in your own environment.
A couple of things to note
- It is cheap but not free, as the agent is usually collecting some basic data such as heap utilisation metrics.
- Today's APM platforms (eg CA APM, new relic) are often deployed to application servers with very little overhead, and these effectively perform the same thing. If you are looking for these sorts of metrics, an APM tool may be worth considering.
Of course, if you're considering a profiler instead of an APM tool, it's because you want the deep dive capability. This means knowing a few things:
- Yes class instrumentation occurs. Check in test environment that your PermGen or equivalent sizing is sufficient as this can hit you (I have seen this repeatedly on Tomcat hosted apps with default 64MB). For Yourkit this can be disabled, however you limit the functionality available if you choose to connect and want to profile.
- If you load the attach agent at runtime then starting some profiling mean many (all?) classes need a rewrite - this can take a LONG time (10+ seconds). For Yourkit if you load ahead of time the cost to start is significantly reduced but it should mean a runtime impact.
- Connecting to the profiler is ~free. Getting some basic info such as GC history is ~free.
- Performing anything more advanced will definitely impact your performance (such as cpu sampling, memory allocation profiling).
- A full memory dump will take some time and pause your VM :).
For stability, the key one is your permgen sizing and being careful about which operations you use, however as mentioned I've not done this for more than a couple of weeks.
Thanks
Jason