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

It is important to pay attention while determining the HTTP session size. If you are creating
large HTTP session objects, calculate the HADB nodes as discussed in
“Tuning HADB” on
page 107
.
Checkpointing Stateful Session Beans
Checkpointing saves a stateful session bean (SFSB) state to the HADB so that if the server
instance fails, the SFSB is failed over to another instance in the cluster and the bean state
recovered. The size of the data being checkpointed and the frequency at which checkpointing
happens determine the additional overhead in response time for a given client interaction.
You can enable SFSB checkpointing at numerous dierent levels:
■
For the entire server instance or EJB container
■
For the entire application
■
For a specic EJB module
■
Per method in an individual EJB module
For best performance, specify checkpointing only for methods that alter the bean state
signicantly, by adding the <checkpointed-methods> tag in the sun-ejb-jar.xml le.
Conguring the JDBC Connection Pool
The Enterprise Server uses JDBC to store and retrieve HADB data. For best performance,
congure the JDBC connection pool for the fastest possible HADB read/write operations.
Congure the JDBC connection pool in the Admin Console under Resources > JDBC >
Connection Pools > pool-name. The connection pool conguration settings are:
■
Initial and Minimum Pool Size: Minimum and initial number of connections maintained
in the pool (default is 8)
■
Maximum Pool Size: Maximum number of connections that can be created to satisfy client
requests (default is 32)
■
Pool Resize Quantity: Number of connections to be removed when idle timeout timer
expires
■
Idle Timeout: Maximum time (seconds) that a connection can remain idle in the pool.
(default is 300)
■
Max Wait Time: Amount of time (milliseconds) caller waits before connection timeout is
sent
Tuning the Enterprise Server for High-Availability
Chapter 6 • Tuning for High-Availability 119










