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

■
FreeSize: free size in MB.
■
Usage: percent used.
Use the hadbm resourceinfo command to monitor resource usage, for example the
following command displays data buer pool information:
%hadbm resourceinfo --databuf
NodeNo Avail Free Access Misses Copy-on-write
0 32 0 205910260 8342738 400330
1 32 0 218908192 8642222 403466
The columns in the output are:
■
Avail: Size of buer, in Mbytes.
■
Free: Free size, when the data volume is larger than the buer. (The entire buer is used at all
times.)
■
Access: Number of times blocks that have been accessed in the buer.
■
Misses: Number of block requests that “missed the cache” (user had to wait for a disk read)
■
Copy-on-write: Number of times the block has been modied while it is being written to
disk.
For a well-tuned system, the number of misses (and hence the number of reads) must be
very small compared to the number of writes. The example numbers above show a miss rate
of about 4% (200 million access, and 8 million misses). The acceptability of these gures
depends on the client application requirements.
Tuning DataBuerPoolSize
To change the size of the database buer, use the following command:
hadbm set DataBufferPoolSize
This command restarts all the nodes, one by one, for the change to take eect. For more
information on using this command, see “Conguring HADB” in Sun GlassFish Enterprise
Server 2.1 High Availability Administration Guide.
LogBuerSize
Before it executes them, HADB logs all operations that modify the database, such as inserting,
deleting, updating, or reading data. It places log records describing the operations in a portion
of shared memory referred to as the (tuple) log buer. HADB uses these log records for undoing
operations when transactions are aborted, for recovery in case of node crash, and for replication
between mirror nodes.
Tuning HADB
Chapter 6 • Tuning for High-Availability 111










