After half a day messing around, the short answer is “it’s not”. Since Eclipse is the heart of STS, I thought that I’d see if the Eclipse performance monitoring tooling (TPTP) is any better than last time I tried it. I could tell from the memory analysis in either that the heap at the end of my process had way too may objects of type JobExecution in it, and all I needed to know then was who was keeping references to them that shouldn’t be? Seems like a simple enough question. ![]() I wrote a simple integration test in JUnit, and profiled it using the two tools. I tried two tools, but only because the first choice didn’t work. I live in STS these days (sometimes dream in it as well), so I needed a tool that worked well in the IDE. The back story to this is I’ve seen plenty of memory leaks, but I haven’t had to deal with one at the coal face for quite some time. I had a suspected memory leak in Spring Batch and I needed to track it down quickly. Here’s the story of my day frustration, then irritation, then finally satisfaction. I haven’t done an exhaustive survey of the marketplace, and that wasn’t the object of the exercise: I just wanted a tool to solve a problem. It’s been a couple of years since I used it in anger, and even then it was the best tool I could find, but now it really is ultra slick. Before shutting down a memory snapshot will be created.I had such a great experience today with Yourkit that I thought I’d write a quick plug. If you run into situations where Confluence is unresponsive and you are not able to trigger a memory snapshot, please ensure that you start Confluence with the onexit=memory parameter in the JVM options (as in the example below) and simply shut down Confluence. You are getting OutOfMemoryError's in your logs.Confluence's memory usage is higher than you expect.This can help us debug tricky performance problems which would otherwise be impossible to analyze remotely. Screenshot: You can take a memory or CPU snapshotĪnalyzing a profiler dump enables Atlassian Support (or you, if you are interested) to see exactly what is happening in your application: what classes are using the memory, what is using CPU and so on. For the CPU snapshot, this will take at least 30 seconds. This profiler dump will be saved to a local temp directory, and the path shown once it is complete. Click it and you should see the options to take a memory or CPU snapshot. Installing the YourKit Pluginĭownload the plugin and upload it into Confluence through the Administration, Plugins page.Ī new menu option, "YourKit Profiling' will appear under the 'Administration' heading. See also Profiling overhead: how to reduce or avoid in the YourKit documentation. agentlib:yjpagent=disablecounts,disablealloc,disablej2ee ![]() This file controls the startup parameters for Tomcat, so you'll need to restart it after making the changes.Īdd the 'agentlib' parameter to the end like this: ![]() To configure Confluence's JVM to use the YourKit agent, you need to add a parameter to CATALINA_OPTS in the bin/setenv.bat file in your Confluence application directory. For example, you might add "C:\Program Files\YourKit Java Profiler 6.0.12\bin\win32" to your PATH, via Control Panel, System, Advanced, Environment Variables. On Windows, add to your PATH environment variable the bin/win32/ directory underneath the YourKit installation directory. The YourKit documentation covers this in more detail. They should be easily applicable to other application servers and JVMs, however. The following instructions apply to Confluence and Tomcat installations with the Oracle (previously Sun) JDK. Note: YourKit version 7 is not compatible with the Confluence yourkit plugin. Download YourKit 6.0 for your platform and follow the installation instructions to install it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |