JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Performance Tuning Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Performance Tuning

2.  Tuning Your Application

3.  Tuning the GlassFish Server

Using the GlassFish Server Performance Tuner

Deployment Settings

Disable Auto-Deployment

Use Pre-compiled JavaServer Pages

Disable Dynamic Application Reloading

Logger Settings

General Settings

Log Levels

Web Container Settings

Session Properties: Session Timeout

Manager Properties: Reap Interval

Disable Dynamic JSP Reloading

EJB Container Settings

Monitoring the EJB Container

Tuning the EJB Container

Overview of EJB Pooling and Caching

Tuning the EJB Pool

EJB Pool Settings

Tuning the EJB Cache

EJB Cache Settings

Pool and Cache Settings for Individual EJB Components

Commit Option

Determining the Best Commit Option

Java Message Service Settings

Transaction Service Settings

Monitoring the Transaction Service

Viewing Monitoring Information

Tuning the Transaction Service

Disable Distributed Transaction Logging

Recover On Restart (Automatic Recovery)

Keypoint Interval

HTTP Service Settings

Monitoring the HTTP Service

DNS Cache Information (dns)

Enabled

CacheEntries (CurrentCacheEntries / MaxCacheEntries)

HitRatio

Caching DNS Entries

Limit DNS Lookups to Asynchronous

Enabled

NameLookups

AddrLookups

LookupsInProgress

File Cache Information (file-cache)

Keep Alive (keep-alive)

Connection Queue

HTTP Service Access Logging

Network Listener Settings

General Settings

HTTP Settings

Max Connections

DNS Lookup Enabled

Timeout

Header Buffer Length

File Cache Settings

Max File Count

Max Age

Transport Settings

Thread Pool Settings

Max Thread Pool Size

Min Thread Pool Size

ORB Settings

Overview

How a Client Connects to the ORB

Monitoring the ORB

Connection Statistics

Thread Pools

Tuning the ORB

Tunable ORB Parameters

ORB Thread Pool Parameters

Client ORB Properties

Controlling Connections Between Client and Server ORB

Load Balancing

Thread Pool Sizing

Examining IIOP Messages

Resource Settings

JDBC Connection Pool Settings

Monitoring JDBC Connection Pools

Tuning JDBC Connection Pools

Pool Size Settings

Timeout Settings

Isolation Level Settings

Connection Validation Settings

Connector Connection Pool Settings

Transaction Support

Load Balancer Settings

4.  Tuning the Java Runtime System

5.  Tuning the Operating System and Platform

Index

HTTP Service Settings

Tuning the monitoring and access logging settings for the HTTP server instances that handle client requests are important parts of ensuring peak GlassFish Server performance.

The following topics are addressed here:

Monitoring the HTTP Service

Disabling the collection of monitoring statistics can increase overall GlassFish Server performance. You can enable or disable monitoring statistics collection for the HTTP service using either the Administration Console or asadmin subcommands.

Refer to Chapter 8, Administering the Monitoring Service, in Oracle GlassFish Server 3.1 Administration Guide for complete instructions on configuring the monitoring service using asadmin subcommands.

If using the Administration Console, click the Configurations->configuration-name->Monitoring node for the configuration for which you want to enable or disable monitoring for selected components. Refer to the Administration Console online help for complete instructions.

For instructions on viewing comprehensive monitoring statistics using asadmin subcommands, see Viewing Comprehensive Monitoring Data in Oracle GlassFish Server 3.1 Administration Guide. If using the Administration Console, you can view monitoring statistics by navigating to the server (Admin Server) node, and then clicking the Monitor tab. Refer to the online help for configuring different views of the available monitoring statistics.

When viewing monitoring statistics, some key performance-related information to review includes the following:

DNS Cache Information (dns)

The DNS cache caches IP addresses and DNS names. The DNS cache is disabled by default. In the DNS Statistics for Process ID All page under Monitor in the web-based Administration interface the following statistics are displayed:

Enabled

If the DNS cache is disabled, the rest of this section is not displayed.

By default, the DNS cache is off. Enable DNS caching in the Administration Console by clicking the Configurations->configuration-name->Network Config->http-listener-name node. Click the HTTP tab and enable the DNS Lookup option.

CacheEntries (CurrentCacheEntries / MaxCacheEntries)

The number of current cache entries and the maximum number of cache entries. A single cache entry represents a single IP address or DNS name lookup. Make the cache as large as the maximum number of clients that access your web site concurrently. Note that setting the cache size too high is a waste of memory and degrades performance.

Set the maximum size of the DNS cache by entering or changing the value in the in the Administration Console by clicking the Configurations->configuration-name->Network Config->http-listener-name node. Click the File tab and set the desired options.

HitRatio

The hit ratio is the number of cache hits divided by the number of cache lookups.

This setting is not tunable.


Note - If you turn off DNS lookups on your server, host name restrictions will not work and IP addresses will appear instead of host names in log files.


Caching DNS Entries

It is possible to also specify whether to cache the DNS entries. If you enable the DNS cache, the server can store hostname information after receiving it. If the server needs information about the client in the future, the information is cached and available without further querying. specify the size of the DNS cache and an expiration time for DNS cache entries. The DNS cache can contain 32 to 32768 entries; the default value is 1024. Values for the time it takes for a cache entry to expire can range from 1 second to 1 year specified in seconds; the default value is 1200 seconds (20 minutes).

Limit DNS Lookups to Asynchronous

Do not use DNS lookups in server processes because they are resource-intensive. If you must include DNS lookups, make them asynchronous.

Enabled

If asynchronous DNS is disabled, the rest of this section will not be displayed.

NameLookups

The number of name lookups (DNS name to IP address) that have been done since the server was started. This setting is not tunable.

AddrLookups

The number of address loops (IP address to DNS name) that have been done since the server was started. This setting is not tunable.

LookupsInProgress

The current number of lookups in progress.

File Cache Information (file-cache)

The file cache caches static content so that the server handles requests for static content quickly. The file-cache section provides statistics on how your file cache is being used.

For information about tuning the file cache, see File Cache Settings.

The Monitoring page lists the following file cache statistics:

Keep Alive (keep-alive)

The following are statistics related to the Keep Alive system. The most important settings you can tune here relate to HTTP Timeout. See Timeout for more information.

Connection Queue

HTTP Service Access Logging

Accessing Logging can be tuned using several asadmin subcommands. Refer to Chapter 8, Administering the Monitoring Service, in Oracle GlassFish Server 3.1 Administration Guide for information about using these subcommands.

If using the Administration Console, Access Logging is configured from the Configurations->configuration-name->HTTP Service page. Refer to the Administration Console online help for complete instructions about the options on this page.

To enable or disable access logging, check or uncheck the Access Logging Enabled checkbox. Access Logging is disabled by default.

When performing benchmarking, ensure that Access Logging is disabled. If Access Logging is enabled, it is recommended that you also enable Rotation to ensure that the logs do not run out of disk space.