Wednesday, September 25, 2002

Have you tuned your JVM on ColdFusion MX yet?

ColdFusion's move to java gives developers and system administrators a wealth of performance tuning options. This is due to the fact that the runtime for ColdFusion is now pluggable (the JVM), we don't have to rely completly on Macromedia to make performance optomizations, we can use different JVM's and lots of different JVM settings to improve the performance and scalibility of our ColdFusion Applications. This is a topic I haven't seen much discussion about yet, and I'm not sure why.

What JVM should I use?

You have lots of choices, IBM, Sun and BEA all make JVM's, each will perform differently. Which is the fastest? I couldn't tell you, it will depend on your server platform, and your application. Sun being the creator of Java, has the most popular JVM, but if you are really concerned about performance you should test with each vendor's JVM.
Here are some articles that may help make your decision (in no particular order)

Tuning Your JVM There are lots of things you can do to tune the JVM, typically there are memory settings, threading settings, and garbage collection settings. For memory settings make sure you Max heap is big enough, also set the initial heap size to be equal to the max heap size, this way all memory is allocate when the server starts up, rather than when it needs it (during a request, allocating memory is slow). Look for a file called Xusage that comes with your JVM this usually shows some of the options that you can set, also look in your JVM docs for more info. You can tune these settings just like you tune your web server or other web applications. Sun Performance tuning links

I haven't had the time to do any JVM testing on ColdFusion MX yet, but if you have I'd love to hear about your experiences email me pete@cfdev.com.