May 13 2009

10 Steps To A Stable and Performant Web Application - Step 4

Posted by Mike Brunt at 6:33 AM
6 comments
- Categories: ColdFusion | JRun-J2EE

In this step we will use both the Metrics Logging output and the Verbose GC logging output to adjust the overall memory size and to help to stop ColdFusion hanging.  We will also adjust the size of each segment of the JVM memory space by passing arguments to the jvm.config file.  

Here are links to the first three steps in this series.

Step 1 - Inspect Production ColdFusion Logs (no older than 7 days).

Step 2 - Enable Enhanced ColdFusion Logging (Metrics Logging).

Step 3 - Enable Enhanced ColdFusion Logging (Verbose Garbage Collection Logging).

These are the resukts of the Metrics and Verbose GC Logging...

Metrics Logging Output:

01/05 12:17:09 metrics Web threads (busy/total/wait): 1/28/0 Sessions: 1 Total Memory=520048 Free=158060

01/05 12:18:09 metrics Web threads (busy/total/wait): 1/28/0 Sessions: 1 Total Memory=520432 Free=215408

01/05 12:19:09 metrics Web threads (busy/total/wait): 1/28/0 Sessions: 1 Total Memory=520984 Free=164688

01/05 12:20:09 metrics Web threads (busy/total/wait): 1/27/0 Sessions: 1 Total Memory=520000 Free=93655

01/05 12:21:09 metrics Web threads (busy/total/wait): 1/27/0 Sessions: 1 Total Memory=520832 Free=58571

01/05 12:22:09 metrics Web threads (busy/total/wait): 1/27/0 Sessions: 1 Total Memory=520792 Free=83309

01/05 12:23:09 metrics Web threads (busy/total/wait): 1/27/0 Sessions: 1 Total Memory=520496 Free=105955

Verbose GC Output:

PSYoungGen total 55360K, used 55360K [0x2bef0000, 0x2f7d0000, 0x2f7d0000)

eden space 52608K, 100% used [0x2bef0000,0x2bef0000,0x2f250000)

from space 2752K, 67% used [0x2f250000,0x2f422630,0x2f500000)

to space 2816K, 0% used [0x2f510000,0x2f510000,0x2f7d0000

We will use this output to add/modify the arguments to the JVM via the jvm.config file…

Defaults in a new CF install - java.args=-server -Xmx512m  XX:MaxPermSize=192m

Modified - java.args=-server -Xms1024m –Xmx1024m -XX:PermSize=96m -XX:MaxPermSize=192m -XX:NewRatio=3 

This will start the heap with 1GB of space with the same max ceiling value, give the Permanent Generation a start size of 96MB and allocate one quarter of the total heap size (256MB) to the New/Young Generation.  

As with all in this series these actions are not theoretical or simply lab based, these are based on succesful projects we carried out on behalf of clients who had ColdFusion performance problems.

We will be at CFObjective 09 in Minneapolis-St Paul and will be presenting "Indiana Jones and The Server of Doom" at 10:15AM on Thursday May 14 and also holding a BOF on all things ColdFusion in the Enterprise at 7:00PM on Friday May 16.

 

 

 

Comments

Abraham Lloyd

Abraham Lloyd wrote on 05/13/09 8:09 AM

Mike, great series. I think a series like this has been missing from the community for a long time, going all the way back to CF 6. Robi Sen and Spike had a few articles about JVM / server tuning, but its nice to see something more current / relevant that also focuses on process and task mechanics while explaining the changes.

I was curious -- what tool(s) do you use to review GC logs, JVM memory utilization, etc? I think that would be a nice addition to the articles.

Again, great work. I'm looking forward to read the rest of the series.
Mike Brunt

Mike Brunt wrote on 05/13/09 3:55 PM

@Abraham thanks for taking the time to comment, really the only special tool I use is SeeFusion and than will be in my next post in the series.
Nathan Miller

Nathan Miller wrote on 05/27/09 8:41 PM

I've enjoyed reading this series so far and have implemented the setting recommendations thus far on my VPS. I'm looking into SeeFusion or FusionReactor - any reason you prefer SeeFusion?
qiudong

qiudong wrote on 03/17/11 7:06 PM

unless http://feiyue.eu.com/feiyue-low-cut-cancas you have more than guests.
Jason

Jason wrote on 05/16/11 7:44 AM

Really great series of articles Mike! It helped me alot so far and i would love to read further on, but I cannot find the rest of this 10 step series on your blog...?
mike

mike wrote on 08/31/11 7:58 AM

Its a shame this died out at step 4

Write your comment



(it will not be displayed)



Leave this field empty: