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

Recover On Restart (Automatic Recovery)
To set the Recover on Restart attribute with the Admin Console, go to Congurations >
cong-name > Transaction Service. Click the Recover check box to set it to true (checked, the
default) or false (un-checked).
You can also set automatic recovery with asadmin, for example:
asadmin set server1.transaction-service.automatic-recovery=false
When Recover on Restart is true, the server will always perform transaction logging, regardless
of the Disable Distributed Transaction Logging attribute.
If Recover on Restart is false, then:
■
If Disable Distributed Transaction Logging is false (the default), then the server will write
transaction logs.
■
If Disable Distributed Transaction Logging is true, then the server will not write transaction
logs.
Not writing transaction logs will give approximately twenty percent improvement in
performance, but at the cost of not being able to recover from any interrupted transactions.
The performance benet applies to transaction-intensive tests. Gains in real applications
may be less.
Keypoint Interval
The keypoint interval determines how often entries for completed transactions are removed
from the log le. Keypointing prevents a process log from growing indenitely.
Frequent keypointing is detrimental to performance. The default value of the Keypoint Interval
is 2048, which is sucient in most cases.
HTTP Service Settings
Monitoring and tuning the HTTP server instances that handle client requests are important
parts of ensuring peak Enterprise Server performance.
■
“Monitoring the HTTP Service” on page 60
■
“Tuning the HTTP Service” on page 64
■
“Tuning HTTP Listener Settings” on page 69
Monitoring the HTTP Service
Enable monitoring statistics for the HTTP service using either Admin Console or asadmin.In
the Admin Console, the monitoring level (LOW or HIGH) has no eect on monitoring the
HTTP Service.
HTTP Service Settings
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 200960










