This chapter makes several suggestions about how to improve the ColdFusion Application Server's performance. Tools are available to watch and see the effects of the changes. Using a good load-testing tool with a well-planned load-testing script is the best way to see the effects of the changes when the server is under load. It is also possible to gain a look into how the ColdFusion server is behaving by using Performance Monitor or CFSTAT. Performance MonitorPerformance Monitor is built into Windows (NT, 200, XP). It looks at resource use for specific components and program processes. In ColdFusion Administrator, under Debug Settings, the Debug Options menu item lets you click a checkbox to enable performance monitoring. Applying the changes will expose ColdFusion counters to Performance Monitor. CAUTION Unlike some of the other settings in debugging, the ColdFusion Application Server service must be restarted in order for Performance Monitor to be able to see the ColdFusion object's counters. Table 50.1 shows the counters available.
The server tuning options mentioned in this chapter either directly or indirectly affect some of these counters. For example, Cache Pops/Sec reports the number of times a template was removed from the cache to make room for a newly parsed template. If this number is not at or near zero, the Template Cache Size setting in ColdFusion Administrator needs to be increased, and possibly more memory added in the server. The Running Requests counter is never more than the Limit Simultaneous Requests To setting in ColdFusion Administrator's Server Settings. Performance Monitor has a graphical user interface that lets you graph any of the counters and also log the counters graphically. cfstatPerformance Monitor is available only in Windows operating systems. Even in Windows, you might want a command-line interface to see the ColdFusion Application Server's counters. cfstat is a command-line utility that is available for all platforms on which ColdFusion runs. TIP You can use the counters in a ColdFusion template by using the GetMeTRicData("monitor_name") function. In Windows, monitor_name is PerfMonitor; on UNIX/Linux, it is CFStat. You can use two optional switches to modify CFSTAT's behavior. They are listed in Table 50.2.
NOTE As with Performance Monitor, the Enable Performance Monitoring option must be checked and the ColdFusion Application Server service restarted in order for cfstat to function. |