Note: This blog post is from 2007. Some content, links and indeed comments from others may be outdated--though not necessarily. Corrections are welcome, in the comments. I may revise the content if necessary.The CF Enterprise Server monitor is more powerful than many may realize, yet naturally some are immediately concerned about its potential overhead, especially if they're considering running it in production. Things aren't quite as obvious as they may seem, or as many may assert.
Update: I've updated this entry now 5 years later, in 2012, to give a bit more context to what I said originally. No change in the message, just a little more info and perspective. (There's also no change in the impact of it, pro or con, in CF 9 or 10.)
First, it's indeed true that depending on what you enable, it *could* be very resource-intensive and could even bring down a server under load. But conversely it also can have ZERO impact--yes, even in production. I'll discuss that in my next entry.
But before that, I just want to take a moment and explain the key 3 features that control what impact, if any, it will have.
Note that there are three buttons at the top of the monitoring page which "start" different monitoring features. (If you don't see these buttons, just refresh the browser again to get them to appear.)
So what are the implications of starting each of the optional monitoring features?
- start memory tracking: this has the highest potential impact for overhead, which can be very substantial, even to the point of crashing your instance. And even on a low-traffic developer machine, you might see a big hit from running this. More on this in a moment.
- start profiling: this has much less overhead. It primarily enables tracking of database activity. The help page for the monitor calls its overhead "minimal", but I will note that on a CF server with tremendous DB activity, its overhead could be more substantial.
- start monitoring: This is the leave impactful button. It's needed to at least see running requests, as well as to have Alerts fire. But even on a busy server I've rarely seen it have a negative impact. That said, you don't need ANY of the 3 buttons enabled to see at least some info. More below.
Definitely check out that help page (from the front page of the monitor) or discussions in my 4-part series of articles on the monitor to learn more about what each button does as well as more about the monitor itself and its many features.
About the Memory Tracking featureYou'll note that I hedged above on the impact of the Memory Tracking. Conventional wisdom is that it is indeed a potential server killer, and I can confirm that I've seen it many times in my CF server troubleshooting consulting practice. But I can also report that I've seen it running on production machines and having virtually no seeming impact. I kid you not.
I suspect it has to do with how many objects are in memory, how complex they are, how busy the server is, etc.
Now, some might propose that you use it only for brief periods (minutes, seconds) to gather some info for analysis, perhaps only in emergency. (I even said this in my initial version of this blog entry.) But many have found that things go horribly wrong on some CF instances the moment it's enabled. So it's probably best not to use it at all on live prod server.
You might be able to do it in a test/dev server, and you may get value form that in looking at the impact at least of individual or small numbers of requests. But beware also that some problems simply don't present themselves except under load (and often only in production, not even with load testing), so using it in dev/test may not help spot/understand/resolve all problems.
So does that mean there's no value if you can't use this feature in prod? Well, no. Remember, this is one of 3 buttons. The other two have less overhead (especially "start monitoring"). More than that, you can get value from the monitor with NONE of the buttons turned on.
Any value if none turned on?
Yes, don't miss this vital point: there is value to using the monitor even with none of the start buttons enabled. That is deserves its own entry. Who says there's no such thing as a free lunch? :-)
So if you hear someone say "don't use the monitor in production", please make sure they're clear on all this. There are 3 features you can enable, or none at all, and each provides different info at different costs--some of it zero.
Postscript: The buttons stay enabled after closing the monitor, and even over restart
I know I've discussed this elsewhere, but while I'm updating this entry let me reiterate the point: it's vital that you understand that if you turn on any of these buttons, they STAY TURNED ON, even if you close the monitor. And EVEN IF YOU RESTART CF. In fact, this is important enough to deserve its own entry. I'll post that now (as I update this in 2012), CF911: Using the #ColdFusion Server Monitor? Be aware that the "Start" buttons remain enabled.
For more like this: