In general, server setup, tuning, troubleshooting and configuration seem to be one of the least understood tools in a typical ColdFusion developers toolbox. Many leave this up to sysadmins who typically do not have a vested interest in ColdFusion and think that Java and JavaScript are the same thing. Hopefully this list will get you motivated to learn more about the “guts� of JRun.
One thing I’m starting to get pretty decent at is configuring, tuning, and troubleshooting ColdFusion MX servers in everything from standalone mode to multi-instance clustering in a multi-tiered scenario. I would not of been able to learn this nearly as quickly (and by quickly, I mean steadily over several years) if it weren’t for the great number of blog posts and articles out there about this particular issue. Granted it’s not what I do full-time, but I think I have a good grasp on it at this point (and I also have a background in Unix, Sysadmin, Networking, etc).
I’m asked frequently to document this sort of thing to which my reply is usually something to the effect of “It’s all over the net. You just have to sit down and learn JRun, how a JVM works, etc.. it’s not just something you just can figure out in 10 minutes from a single source of documentation.” Over the years I’ve kept a good number of bookmarks to reference when trying to troubleshoot a server hanging or simply when setting up a new server or server environment, and thought I’d post them all in one place for anyone else trying to get a grasp on how to setup JRun clustering, how to tune ColdFusion, etc.
I don’t have any links in particular to learn what a JVM is, what the various stages of generation are, how garbage collection works, etc, but if anyone has these or any other links which belong here, let me know and I’ll put them up. I apologize that most of these are ColdFusion MX 6.1 links, but I’ve been collecting them for quite some time and I don’t think that much of the fundamental technology has changed in 7.0 other than it being a lot easier to manage instances.
Okay time to stop being superfluous and get to business. In no particular order:
Clustering & Scaling ColdFusion MX
- Clustering ColdFusion MX 6.1 Enterprise on JRun
- ColdFusion MX 6.1: Clustering Options
- ColdFusion MX 6.1 LiveDocs: Enabling Load Balancing & Failover
- Managing Clusters with Enterprise Manager & Packaging Applications in ColdFusion MX 7
- Using JRun instances for CFMX deployment
- ColdFusion MX 6.1 LiveDocs: Enabling load balancing and failover
- Installing the ColdFusion J2EE configuration with JRun on UNIX
- ColdFusion 7 Deployment Options: J2EE application servers
- When One ColdFusion Is Not Enough
- JRun 4.0: Configuring individual JVM settings for each JRun Server – Once I’ve configured the instances I need to cluster, I usually leave the “master” ColdFusion instance alone but give it a different JVM config so that it only uses a small amount of memory to manage the instances which are actually being used.
- JRun LiveDocs: Connector Based Clustering
Tuning & Troubleshooting ColdFusion MX
- activeHandlerThreads or Simultaneous Requests: Less is More – Personally I’ve found the baseline settings for activeHandlerThreads in this post as being too high, but I think it’s mostly because of the “unique” enviornment I work in and is probably great advice for 99% of the ColdFusion applications out there. As a side note, the metric I’ve been seeing the sweet spot at is 6 per CPU.
- Simultaneous Requests in CFMX 7
- Keep Library Loaded – Check this box to retain the library in RAM – Using CFX tags on your MX install and having crashing problems? Might want to check out yet another helpful entry from Macromedia’s guru support/genetics guy, Stephen Erat.
- CFMX Performance Settings – If you only have time to read one tuning ColdFusion MX / JRun link, this would be the one. This post from Sarge is curt yet informative and will give you a good baseline to start from.
- Hung Servers, Java.lang.OutOFMemory errors and Tuning CF JVM I’ve read/heard mixed reviews about this entry from MM tuning guru’s, but even at face value it will at least give you some more datapoints and details to learn from whether or not you agree with his post.
- JRun CPU Consumption Pegged at 50%
- Tuning Garbage Collection Outline
- Have you tuned your JVM on ColdFusion MX yet?
- ColdFusion MX: Explanation of Request Timeout and threadWaitTimeout settings
- JRun 4: General troubleshooting techniques for an unresponsive JRun server
- JRun Administration: Server Settings: The jrun.xml File
Java Tuning Fundamentals
- Java 1.4.2 Garage Collectors
- Tuning Garbage Collection with the 1.4.2 Java Virtual Machine – Thanks to Tom for the previous two links.
- Java Garbage Collection Chart
- jvmstat / visualgc
- Java Performance Tuning Resources
Miscellaneous
- Making Persistent CFCs Thread Safe
- Restarting ColdFusion MX Programmatically
- SeeFusion – A great product to actively watch ColdFusion/JRun servers, kill long running threads manually, etc. Not a replacement for thread dumps or adding extra information to the JRun metrics logging when doing load testing, but it works great in combination with them. Disclaimer: I tried it out briefly once upon a time, but haven’t used it in awhile nor have purchased a license for it, yet.
As I mentioned earlier, I’m sure I’m missing plenty of other great resources, so if you have any, please leave them in the comments and I’ll add them to the list.
9 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Good job! And you’re right. Learning to tune ColdFusion isn’t easy or something you can do in 10 minutes or a day.
A couple good links on GC:
http://java.sun.com/j2se/1.4.2.....dex.html#6
http://java.sun.com/docs/hotsp.....index.html
ya know, I’m no slouch on a computer- I an an analyst for the missile defense agency- I don’t understand a single thing on this entire page….
Well done Brandon. Nice survey of clustering and performance related articles. I usually turn to Brandon Purcell’s (and Frank DeRienzo’s) articles for architectural considerations of complex clustering scenarios, and to Pete Freitag’s articles for JVM and GC tuning information.
Clustering in CFMX 7 has abstracted much of the guts of how to set up a cluster. Where CFMX 6.1 was much more hands on tinkering, CFMX 7′s Enterprise Manager and Instance Manager make setting up clusters much more practical and intuitive, and its not absolutely necessary to know all the details found in Purcell’s early articles unless you want to have a more academic understanding of how it works. There remain some features I’d like to see regarding better post-configuation mangement of JRun/CF clusters, but cluster configuration in CFMX 7 should be substantially easier than CFMX 6.1.
Great post Brandon – went right into my del.icio.us bookmarks!
Tom:
Thanks for the links. I also added a few other Java specific resources.
Steven:
Good point about the post configuration– that reminds me of at least one blog entry I need to write sometime. I added a link to setting up different JVM arguments for different instances as that was one thing which it reminded me of.
Pete:
Thanks!
So what exactly do you have issues with or do the “gurus” have iusses with with my article?
robi
Hey Robi,
Thanks for stopping by. I found your post to be informative myself, and it was among the first on ColdFusion MX tuning in general.
For an example of what I was referring to, check the comments section here.
it would be nice if he commented what was incorrect especially since i made him aware of the subject originally. oh well. anyways i have a much more detailed document ill put up in a couple of weeks that explains more about the heap etc.
Brandon,
It seems Steven has deleted mine and his own comments on his site. So what other “MM tuning guru’s” have mixed reviews?