Performance buckets allow you to define buckets and link them to various server functions. Every time one of these functions is invoked, the server collects statistical data and adds it to the bucket. For example, send-cgi and NSServletService are functions used to serve the CGI and Java servlet requests respectively. You can either define two buckets to maintain separate counters for CGI and servlet requests, or create one bucket that counts requests for both types of dynamic content. The cost of collecting this information is little and impact on the server performance is usually negligible. This information can later be accessed using the perfdump utility. The following information is stored in a bucket:
Name of the bucket. This name is used for associating the bucket with a function.
Description. A description of the functions that the bucket is associated with.
Number of requests for this function. The total number of requests that caused this function to be called.
Number of times the function was invoked. This number may not coincide with the number of requests for the function because some functions may be executed more than once for a single request.
Function latency or the dispatch time. The time taken by the server to invoke the function.
Function time. The time spent in the function itself.
First, you must enable performance measurement as described in Monitoring Current Activity Using the perfdump Utility
Init fn="define-perf-bucket" name="acl-bucket" description="ACL bucket" Init fn="define-perf-bucket" name="file-bucket" description="Non-cached responses" Init fn="define-perf-bucket" name="cgi-bucket" description="CGI Stats"
The example above creates three buckets: acl-bucket, file-bucket, and cgi-bucket. To associate these buckets with functions, add bucket=bucket-name to the obj.conf function for which you wish to measure performance.
PathCheck fn="check-acl" acl="default" bucket="acl-bucket" ... Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file" bucket="file-bucket" ... <Object name="cgi"> ObjectType fn="force-type" type="magnus-internal/cgi" Service fn="send-cgi" bucket="cgi-bucket" </Object>
The server statistics in buckets can be accessed using the perfdump utility. The performance buckets information is located in the last section of the report returned by perfdump.
The report contains the following information:
Average, Total, and Percent columns give data for each requested statistic.
Request Processing Time is the total time required by the server to process all requests it has received so far.
Number of Requests is the total number of requests for the function.
Number of Invocations is the total number of times that the function was invoked. This differs from the number of requests in that a function could be called multiple times while processing one request. The percentage column for this row is calculated in reference to the total number of invocations for all of the buckets.
Latency is the time in seconds Sun Java System Web Server takes to prepare for calling the function.
Function Processing Time is the time in seconds Sun Java System Web Server spent inside the function. The percentage of Function Processing Time and Total Response Time is calculated with reference to the total Request Processing Time.
Total Response Time is the sum in seconds of Function Processing Time and Latency.
Performance Counters: ------------------------------------------------ Average Total Percent Total number of requests: 0 Request processing time: 0.0000 0.0000 default-bucket (Default bucket) Number of Requests: 0 ( 0.00%) Number of Invocations: 0 ( 0.00%) Latency: 0.0000 0.0000 ( 0.00%) Function Processing Time: 0.0000 0.0000 ( 0.00%) Total Response Time: 0.0000 0.0000 ( 0.00%)