I am attempting to solve performance issues with a large and complex tomcat java web application. The biggest issue at the moment is that, from time to time, the memory usage spikes and the application becomes unresponsive. I've fixed everything I can fix with log profilers and Bayesian analysis of the log files. I'm considering running a profiler on the production tomcat server.
A Note to the Reader with Gentle Sensitivities:
I understand that some may find the very notion of profiling a production app offensive. Please be assured that I have exhausted most of the other options. Reason I am considering this is that I do not have the resources to completely duplicate our production setup on my test server, and I have been unable to cause the same failures on my test server.
Questions:
I am looking for answers which work either for a java web application running on tomcat, or answer this question in a language agnostic way.
- What are the performance costs of profiling?
- Any other reasons why it is a bad idea to remotely connect and profile a web application in production (strange failure modes, security issues, etc)?
- How much does profiling effect the memory foot print?
- Specifically are there java profiling tools that have very low performance costs?
- Any java profiling tools designed for profiling web applications?
- Does anyone have benchmarks on the performance costs of profiling with visualVM?
- What size applications and datasets can visualVM scale to?