Server User Manual
Table Of Contents
- Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
- Preface
- Overview of Enterprise Server Performance Tuning
- Tuning Your Application
- Java Programming Guidelines
- Java Server Page and Servlet Tuning
- EJB Performance Tuning
- Goals
- Monitoring EJB Components
- General Guidelines
- Using Local and Remote Interfaces
- Improving Performance of EJB Transactions
- Use Container-Managed Transactions
- Don’t Encompass User Input Time
- Identify Non-Transactional Methods
- Use TX_REQUIRED for Long Transaction Chains
- Use Lowest Cost Database Locking
- Use XA-Capable Data Sources Only When Needed
- Configure JDBC Resources as One-Phase Commit Resources
- Use the Least Expensive Transaction Attribute
- Using Special Techniques
- Tuning Tips for Specific Types of EJB Components
- JDBC and Database Access
- Tuning Message-Driven Beans
- Tuning the Enterprise Server
- Deployment Settings
- Logger Settings
- Web Container Settings
- EJB Container Settings
- Java Message Service Settings
- Transaction Service Settings
- HTTP Service Settings
- ORB Settings
- Thread Pool Settings
- Resources
- Tuning the Java Runtime System
- Tuning the Operating System and Platform
- Tuning for High-Availability
- Index

Time Out
Time Out determines the maximum time (in seconds) that the server holds open an HTTP keep
alive connection. A client can keep a connection to the server open so that multiple requests to
one server can be serviced by a single network connection. Since the number of open
connections that the server can handle is limited, a high number of open connections will
prevent new clients from connecting.
The default time out value is 30 seconds. Thus, by default, the server will close the connection if
idle for more than 30 seconds. The maximum value for this parameter is 300 seconds (5
minutes).
The proper value for this parameter depends upon how much time is expected to elapse
between requests from a given client. For example, if clients are expected to make requests
frequently then, set the parameter to a high value; likewise, if clients are expected to make
requests rarely, then set it to a low value.
HTTP Protocol
The only HTTP Protocol attribute that signicantly aects performance is DNS Lookup
Enabled.
DNS Lookup Enabled
This setting species whether the server performs DNS (domain name service) lookups on
clients that access the server. When DNS lookup is not enabled, when a client connects, the
server knows the client’s IP address but not its host name (for example, it knows the client as
198.95.251.30, rather than www.xyz.com). When DS lookup is enabled, the server will resolve
the client’s IP address into a host name for operations like access control, common gateway
interface (CGI) programs, error reporting, and access logging.
If the server responds to many requests per day, reduce the load on the DNS or NIS (Network
Information System) server by disabling DNS lookup. Enabling DNS lookup will increase the
latency and load on the system—do so with caution.
HTTP File Cache
The Enterprise Server uses a le cache to serve static information faster. The le cache contains
information about static les such as HTML, CSS, image, or text les. Enabling the HTTP le
cache will improve performance of applications that contain static les.
Set the le cache attributes in the Admin Console under Congurations > cong-name > HTTP
Service (HTTP File Cache).
HTTP Service Settings
Chapter 3 • Tuning the Enterprise Server 67










