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

For more information on conguring the load balancer plug-in, see “Conguring the HTTP
Load Balancer” in Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide
.
HADB timeouts
The sql_client time out value may aect performance.
Operating System Conguration
If the number of semaphores is too low, HADB can fail and display this error message:
No space left on device
This can occur either while starting the database, or during run time.
To correct this error, congure semaphore settings. Additionally, you may need to congure
shared memory settings. Also, adding nodes can aect the required settings for shared memory
and semaphores. For more information, see
“Conguring Shared Memory and Semaphores” in
Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide
.
Tuning the Enterprise Server for High-Availability
This section discusses how you can congure the high availability features of Enterprise Server.
This section discusses the following topics:
■
“Tuning Session Persistence Frequency” on page 117
■
“Session Persistence Scope” on page 118
■
“Session Size” on page 118
■
“Checkpointing Stateful Session Beans” on page 119
■
“Conguring the JDBC Connection Pool” on page 119
■
Descriptor conguration in the web application
To ensure highly available web applications with persistent session data, the high availability
database (HADB) provides a backend store to save HTTP session data. However, there is a
overhead involved in saving and reading the data back from HADB. Understanding the
dierent schemes of session persistence and their impact on performance and availability will
help you make decisions in conguring Enterprise Server for high availability.
In general, maintain twice as many HADB nodes as there are application server instances. Every
application server instance requires two HADB nodes.
Tuning the Enterprise Server for High-Availability
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009116










