Server Performance Monitoring


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 Monitor

Performance 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.

Table 50.1. ColdFusion Counters Available in Performance Monitor

COUNTER

DESCRIPTION

Average DB Time (msec)

A running average of the amount of time, in milliseconds, that an individual database operation launched by ColdFusion spent to complete.

Average Queue Time (msec)

A running average of the amount of time, in milliseconds, that requests spent waiting in the ColdFusion input queue before ColdFusion began to process them.

Average Request Time (msec)

A running average of the total amount of time, in milliseconds, that ColdFusion spent to process a request. In addition to general page- processing time, this value includes both queue time and database processing time.

Bytes In/Sec

The number of bytes per second that the ColdFusion Server received.

Bytes Out/Sec

The number of bytes per second that the ColdFusion Server returned.

Cache Pops/Sec

The number of times per second that a cached template had to be ejected from the template cache to make room for a new template.

DB Hits/Sec

The number of database operations per second that the ColdFusion Server performed.

Page Hits/Sec

The number of Web pages per second that the ColdFusion Server processed.

Queued Requests

The number of Web pages per second that the ColdFusion Server processed.

Running Requests

The number of requests that the ColdFusion Server is currently actively processing.

Timed Out Requests

The number of requests that timed out and never got to run while waiting for the ColdFusion Server to process.


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.

cfstat

Performance 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.

Table 50.2. CFSTAT Switches

SWITCH

DESCRIPTION

-n

This instructs cfstat not to display column headers, which is helpful if you are redirecting output to a file and don't want the column headers.

x

This number specifies, in seconds, how often the counters should be polled and displayed.


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.




Macromedia ColdFusion MX 7 Certified Developer Study Guide
Macromedia ColdFusion MX 7 Certified Developer Study Guide
ISBN: 0321330110
EAN: 2147483647
Year: 2004
Pages: 389
Authors: Ben Forta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net