perfdump is a Server Application Function (SAF) built into Web Server that collects various pieces of performance data from the Web Server internal statistics and displays them in ASCII text. The perfdump output does not display all the statistics available through the command-line statistics or the Admin Console, but it can still be a useful tool. For example, you can still use perfdump even if the Administration Server is not running. You can view the perfdump output through the CLI, which is enabled by default, or you can view the perfdump output through a URI, which you have to enable. If you enable the URI, you must control access to the perfdump URI, otherwise it can be visible to users.
With perfdump, the statistics are unified. Rather than monitoring a single process, statistics are multiplied by the number of processes, which gives you an accurate view of the server as a whole.
For information on tuning the information displayed by perfdump, see Using Monitoring Data to Tune Your Server.
You can enable perfdump URI for a virtual server through the Admin Console.
The statistics displayed by perfdump are for the server as a whole. If you enable perfdump on one virtual server, it displays statistics for the whole server, not an individual virtual server.
From Common Tasks, select a configuration.
Select the virtual server and click Edit Virtual Server.
Click the Monitoring Settings tab.
Select the Plain Text Report Enabled checkbox.
Provide a URI for accessing the report, for example /.perf.
Click Save.
Deploy the configuration.
To access perfdump, access the URI on the virtual server.
For example: http://localhost:80/.perf
You can request the perfdump statistics and specify how frequently the browser should automatically refresh as measured in seconds. The following example sets the refresh to every 5 seconds:
http://yourhost/.perf?refresh=5
Use the following command to enable perfdump:
./wadm enable-perfdump --user=admin-user --password-file=admin-password-file [--uri=uri]--config=config-name--vs=virtual-server-name
Use the uri option to set the pefdump URI.
Deploy the configuration using the wadm deploy-config command.
To access perfdump, access the URI on the virtual server.
For example: http://localhost:80/.perf
You can request the perfdump statistics and specify how frequently the browser should automatically refresh as measured in seconds. The following example sets the refresh to every 5 seconds:
http://yourhost/.perf?refresh=5
In addition to a URI, you can also access perfdump output through the command-line interface. It is enabled by default. Unlike viewing perfdump output through the URI, the Administration Server must be running to view perfdump output at the command-line. However, if request processing threads are hanging in your server and you cannot use the URI, you can still access perfdump output through the CLI.
To view the perfdump output through the command-line interface, enter:
./wadm get-perfdump --user=admin-user --password-file=admin-password-file --config=config-name --node=node-name
The output appears in your command window.
The following is sample perfdump output:
webservd pid: 29133 Sun Java System Web Server 7.0 B07/13/2006 17:09 (SunOS DOMESTIC) Server started Fri Jul 14 14:34:15 2006 Process 29133 started Fri Jul 14 14:34:17 2006 ConnectionQueue: ----------------------------------------- Current/Peak/Limit Queue Length 2/237/1352 Total Connections Queued 67364017 Average Queue Length (1, 5, 15 minutes) 4.52, 4.73, 4.85 Average Queueing Delay 13.63 milliseconds ListenSocket ls1: ------------------------ Address https://0.0.0.0:2014 Acceptor Threads 1 Default Virtual Server https-test KeepAliveInfo: -------------------- KeepAliveCount 198/200 KeepAliveHits 0 KeepAliveFlushes 0 KeepAliveRefusals 56844280 KeepAliveTimeouts 365589 KeepAliveTimeout 10 seconds SessionCreationInfo: ------------------------ Active Sessions 128 Keep-Alive Sessions 0 Total Sessions Created 128/128 Server cache disabled Native pools: ---------------------------- NativePool: Idle/Peak/Limit 1/1/128 Work Queue Length/Peak/Limit 0/0/0 TestPool: Idle/Peak/Limit 5/5/10 Work Queue Length/Peak/Limit 0/0/15 DNSCacheInfo: ------------------ enabled yes CacheEntries 4/1024 HitRatio 62854802/62862912 ( 99.99%) Async DNS disabled Performance Counters: ------------------------------------------------ Average Total Percent Total number of requests: 62647125 Request processing time: 0.0343 2147687.2500 default-bucket (Default bucket) Number of Requests: 62647125 (100.00%) Number of Invocations: 3374170785 (100.00%) Latency: 0.0008 47998.2500 ( 2.23%) Function Processing Time: 0.0335 2099689.0000 ( 97.77%) Total Response Time: 0.0343 2147687.2500 (100.00%) Sessions: ----------------------------------------------------------------------------------------------------------- Process Status Client Age VS Method URI Function 29133 response 192.6.7.7 115 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 192.6.7.7 8 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 192.6.7.7 4 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 10.5.8.19 4 https-test GET /perf service-dump 29133 response 192.6.7.7 3 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 192.6.7.7 3 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 192.6.7.7 2 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 192.6.7.7 2 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 192.6.7.7 2 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 response 192.6.7.7 2 https-test GET /qa_webapp/CheckNetwork.class service-j2ee 29133 request 192.6.7.7 0 29133 request 192.6.7.7 0 29133 request 192.6.7.7 0 29133 request 192.6.7.7 0 29133 request 192.6.7.7 0 29133 response 192.6.7.7 0 https-test GET /file1.shtml shtml_send 29133 request 192.6.7.7 0 29133 request 192.6.7.7 0 29133 response 192.6.7.7 0 https-test GET /find-pathinfo-forward/pathinfo.pl/p/info send-cgi 29133 request 192.6.7.7 0 29133 updating 192.6.7.7 29133 updating 192.6.7.7 29133 updating 192.6.7.7 29133 updating 192.6.7.7 . . .
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 service-j2ee 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 minimal, and the impact on the server performance is usually negligible. This information can later be accessed using perfdump. The following information is stored in a bucket:
Name of the bucket. This name associates the bucket with a function.
Description. A description of the functions with which the bucket is associated.
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 might not coincide with the number of requests for the function, because some functions might 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.
The default-bucket is predefined by the server. It records statistics for the functions not associated with any user-defined bucket.
You must specify all configuration information for performance buckets in the magnus.conf and obj.conf files. Only the default-bucket is automatically enabled.
First, you must enable performance statistics collection and perfdump.
The following examples show how to define new buckets in magnus.conf:
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 previous examples create 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 to measure performance.
Example
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>
For more information, see The bucket Parameter in Sun Java System Web Server 7.0 Update 6 Administrator’s Configuration File Reference.
The server statistics in buckets can be accessed using perfdump. 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 number differs from the number of requests because a function can 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 that Web Server uses to call the function.
Function Processing Time is the time in seconds that Web Server spends 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.
The following is an example of the performance bucket information available through perfdump:
Performance Counters: ------------------------------------------------ Average Total Percent Total number of requests: 62647125 Request processing time: 0.0343 2147687.2500 default-bucket (Default bucket) Number of Requests: 62647125 (100.00%) Number of Invocations: 3374170785 (100.00%) Latency: 0.0008 47998.2500 ( 2.23%) Function Processing Time: 0.0335 2099689.0000 ( 97.77%) Total Response Time: 0.0343 2147687.2500 (100.00%)