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

Disk Conguration
If HTTP access is logged, follow these guidelines for the disk:
■
Write access logs on faster disks or attached storage.
■
If running multiple instances, move the logs for each instance onto separate disks as much
as possible.
■
Enable the disk read/write cache. Note that if you enable write cache on the disk, some
writes might be lost if the disk fails.
■
Consider mounting the disks with the following options, which might yield better disk
performance: nologging, directio, noatime.
Network Conguration
If more than one network interface card is used, make sure the network interrupts are not all
going to the same core. Run the following script to disable interrupts:
allpsr=‘/usr/sbin/psrinfo | grep -v off-line | awk ’{ print $1 }’‘
set $allpsr
numpsr=$#
while [ $numpsr -gt 0 ];
do
shift
numpsr=‘expr $numpsr - 1‘
tmp=1
while [ $tmp -ne 4 ];
do
/usr/sbin/psradm -i $1
shift
numpsr=‘expr $numpsr - 1‘
tmp=‘expr $tmp + 1‘
done
done
Put all network interfaces into a single group. For example:
$ifconfig ipge0 group webserver
$ifconfig ipge1 group webserver
Start Options
In some situations, performance can be improved by using large page sizes. The start options to
use depend on your processor architecture. The following examples show the options to start
the 32–bit Enterprise Server and the 64–bit Enterprise Server with 4–Mbyte pages.
Tuning UltraSPARC® T1–Based Systems
Chapter 5 • Tuning the Operating System and Platform 105










