Sun Java System Web Server 7.0 Update 8 Performance Tuning, Sizing, and Scaling Guide

Monitoring Current Activity Using perfdump

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.

ProcedureTo Enable the perfdump URI from the Admin Console

You can enable perfdump URI for a virtual server through the Admin Console.


Note –

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.


  1. From Common Tasks, select a configuration.

  2. Select the virtual server and click Edit Virtual Server.

  3. Click the Monitoring Settings tab.

  4. Select the Plain Text Report Enabled checkbox.

  5. Provide a URI for accessing the report, for example /.perf.

  6. Click Save.

  7. Deploy the configuration.

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

ProcedureTo Enable the perfdump URI from the CLI

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

  2. Deploy the configuration using the wadm deploy-config command.

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

ProcedureTo View the perfdump Data from the CLI

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.

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

Sample perfdump Output

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

Using Performance Buckets

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:

Configuration

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 8 Administrator’s Configuration File Reference.

Performance Report

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:

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%)