I am in the position of needing to check out what is going on in the memory of the JVM instance running a particular process. I need to see if it’s being release properly (no memory leaks), and get an idea of when the process will top out (how many requests). So, I tried out FusionReactor, and that gave me a decent picture of things (http://www.fusion-reactor.com). And I decided to give JFluid a whirl. There are lots of good blogs, and pages by Sun on this, so have a look around, if you are planning to set this up. Here are a couple of links that were helpful to me:
I had some difficulty before getting JFluid to run (links later) and didn’t have a pressing need. But now I really wanted to have a good look. And when I did look, I found that JFluid had been "promoted" – the once experimental package had been packaged for NetBeans, the old pages for JFluid forwarding to the new pages. The package is now officially known as NetBeans Profiler (http://profiler.netbeans.org/index.html) It supports JVM 1.42, which is what we are running CF 7.02 on, so it will work well. It also supports JVM 1.41, 1.5, but each flavor with a different manner of support. In addition to the JVM version support having nuanced differences, the Netbeans platforms each have their own specific packages (Netbeans 4.1, 5.0, 5.5, 5.51 ). I run Netbeans 5.5 right now, so that’s what I got, in three downloads, the three parts to the package. One part is a modified jvm.dll for JVM 1.42 (Windoze) or .so for Unix platforms, amidst caveats that Sun does not support the 1.42 build, that it is presented "as is." Another part is the profileattach.dll’s (or .so) for attaching the profiler to the jvm. And lastly there is the runtime. Read Sun’s page carefully, as it’s easy to miss something. I did not get dynamic attachment working, but rather, Direct Attachment, which is actually better for what I am doing. I have to launch the Coldfusion server from the command line, but I see the system out messages. Netbeans has "wizard" for setting up the profiling, which presents these options. At the end I had these instructions:
Step 1. Add the profiler native libraries to the Path, e.g. using SET Path=C:Program Filesnetbeans-5.5profiler1libdeployedjdk142windows;%Path% Step 2. Setup the server to run on modified Profiler 1.4.2 JDK, which can be found in C:Documents and Settingshoward.netbeans5.5modulesprofiler-ea-vm This typically means changing system/environment variable JAVA_HOME as follows: SET JAVA_HOME=C:Documents and Settingshoward.netbeans5.5modulesprofiler-ea-vm Step 3. When starting the server, provide extra startup option to the java command: -Xrunprofilerinterface:"’"C:Program Filesnetbeans-5.5profiler1lib’"",5140 Step 4. The JVM will start, but will not proceed with server execution until you connect the profiler to it.
Note: I had to remove the -XX:UseParallelGC setting before it would run. Once these changes have been made, I can launch the CF Server with "jrun -start cfusion" and it will pause, waiting for the profiler to attach. In netbeans, I attach the profiler, and I start seeing info. Sure looks pretty, but it doesn’t do much for me unless I can interpret the data, and explain what it means. So, the first step is getting some baseline measures on processing and proceed from there. (continued)