Monitoring Your c-tree Server Performance
The c-tree Server V8.14 tracks and reports a wealth
of performance-oriented statistics. The server's Performance SnapShot
capability enables the capture of performance monitoring data using
a combination of configuration file options and the SnapShot c-tree
Plus API function. Monitoring the health of your c-tree Server is key
to ensuring the best performance for your database applications.
The performance data can be captured automatically
at specified intervals or on demand in the following ways:
- The c-tree Server Statistics Utility, ctstat, provides
a command-line interface to the SnapShot API function, supporting
output of c-tree Server statistics at the c-tree Server system, user,
file, and function levels.
- Configuration options support automatic performance
snapshots by specifying an interval between automatic snapshots and
the contents of the snapshots. The performance data captured by automatic
snapshots are written to the c-tree Server system event log (SYSLOG)
files. Configuration options can also be used to capture the automatic
system snapshot data to the human-readable SNAPSHOT.FCS file.
- The SnapShot API function can control automatic snapshots,
overriding configuration options (if any), and can capture on-demand
performance data:
- to either the SYSLOG files or to the human-readable SNAPSHOT.FCS
file, or
- as a return to the calling program.
Statistics to Watch
The c-tree Server has numerous tuning options available
to ensure the utmost in performance. Many of these options fall into
several broad categories. Some specific areas to check when examining
your c-tree Sever for the best performance are listed here.
- Are data/index cache hit rates high? (Approaching
100% is best for performance.)
- What % of data/index cache are in use? If not approaching
100%, increasing the data and/or index cache sizes might improve
performance by reducing disk I/O.
- How many disk reads/writes per second? Do the I/O
stats match expectations based on client operations?
- Is the number of active clients the expected number?
- How many concurrent locks? (Watch for an excessive
number based on number of connected clients.)
- How many transactions/sec?
The following sections discuss how to use the performance
monitoring abilities of the c-tree Server.
The c-tree Server Statistics Utility
The c-tree Server Statistics utility, ctstat, is a
client utility used to display statistics collected by the c-tree
Server. It is found in the client folder of the Server installation
and demonstrates the use of the SnapShot function. This section describes
the reports that this utility produces and how to use the utility
to generate these reports.
The command-line usage for the ctstat utility is as
follows:
ctstat <report_type> [-u <userid>] [-p <password>] [-s <servername>]
[-i <int> [<cnt>]] [-h <frq>] [-d]
where:
<report_type> is one of:
-vas Admin-System Report
-vts Tivoli-System Report
-vaf <file>... Admin-File Report
-vtf <file>... Tivoli-File Report
-vau <user>... Admin-User Report
-func Function Timing Report
-text Write system snapshot to SNAPSHOT.FCS
-u <userid> Connect to c-tree Server using user ID <userid>
-p <password> Connect to c-tree Server using password <password>
-s <servername> Connect to c-tree Server using server name <servername>
-i <int> [<cnt>] Pause <int> seconds for optional <cnt> times
-h <frq> Print a description header every <frq> outputs
-d Show cache stats as delta
Function Profiling
The c-tree Server Statistics Utility can also produce
useful information about the timing of c-tree function calls. Use
the following command line to produce function timing information:
ctstat -func -u ADMIN -p ADMIN -s FAIRCOMS -i 10
This information profiles the c-tree Server's operations.
Knowing which functions the server is spending the most time performing
can lead to insights into ways to better improve performance.
Analyze Statistics
You can capture all of the SnapShot statistics from
the c-tree Server to a text file, SNAPSHOT.FCS, for later analysis.
The following command line will enable this output in 30 second intervals
ctstat -text -u ADMIN -p ADMIN -s FAIRCOMS -i 30
The c-tree SnapShot Parser Utility, ctsnpr, is used
to parse a SNAPSHOT.FCS into a text file in comma separated value
format. You can use applications such as Microsoft Excel to view this
file and graph the statistics. This method will help to visually observe
patterns of activity over time.
Automatic Logging to SNAPSHOT.FCS
The c-tree Server supports automatically writing performance
snapshots to the SYSLOG files. It can also write system snapshots
in human- readable form to the SNAPSHOT.FCS text file. The following
sections describe how to enable automatic snapshots.
Write system snapshots to the human-readable SNAPSHOT.FCS
text file with the following DIAGNOSTICS options:
DIAGNOSTICS SNAPSHOT_SHUTDOWN
DIAGNOSTICS SNAPSHOT_AUTOMATIC
DIAGNOSTICS SNAPSHOT_SHUTDOWN writes a system snapshot
to SNAPSHOT.FCS at the start of the server shutdown process. DIAGNOSTICS
SNAPSHOT_AUTOMATIC writes any automatic snapshots to SNAPSHOT.FCS
instead of to the SYSLOG files. However, only the system snapshot
is written. Snapshots for activated users and/or files are ignored.
Performance Monitoring Using the SnapShot API
c-tree Server configuration options provide an easy
way to enable automatic performance snapshots. Additional flexibility
and access to the complete set of statistics maintained by the c-tree
Server is available programmatically through the SnapShot c-tree API
function. This API function:
- Controls automatic snapshots, overriding configuration
options (if any).
- Writes snapshots to the SYSLOG files on demand, whether
or not automatic snapshots are active.
- Writes system snapshots in human-readable form to
SNAPSHOT.FCS .
- Returns snapshot data on-demand to the calling application
program.
Conclusions
Performance monitoring is a vital activity to ensure
your c-tree Server is performing in the most efficient manner. The
c-tree Sever has a powerful statistics monitoring facility FairCom
calls SnapShot. Regular examination of server statistics can help identify
application bottlenecks, as well as potential problems with the c-tree
Server environment.
In this article we have shown three ways to put the
SNAPSHOT feature to use with your c-tree Server.
- The c-tree Plus Statistics Utility, ctstat, providing
remote client monitoring.
- Automatic logging of c-tree Server Statistics via
server configuration keywords.
- The SnapShot Programmatic API for direct use in your
applications.
The c-tree Server SnapShot facilities provide MUCH
more power than what has been described here. Complete details can
be found in the documentation section of the FairCom web site.
www.faircom.com/support/ctreeDocs/pdf/fcupdate.pdf
|