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

TABLE 1–2 Factors That Aect Performance
Concept In practice Measurement Value sources
User Load Concurrent
sessions at
peak load
Transactions Per Minute (TPM)
Web Interactions Per Second
(WIPS)
(Max. number of concurrent users) * (expected response time) /
(time between clicks)
Example:
(100 users*2sec)/10sec=20
Application
Scalability
Transaction
rate measured
on one CPU
TPM or WIPS Measured from workload benchmark. Perform at each tier.
Vertical
scalability
Increase in
performance
from
additional
CPUs
Percentage gain per additional
CPU
Based on curve tting from benchmark. Perform tests while
gradually increasing the number of CPUs. Identify the “knee” of
the curve, where additional CPUs are providing uneconomical
gains in performance. Requires tuning as described in this guide.
Perform at each tier and iterate if necessary. Stop here if this
meets performance requirements.
Horizontal
scalability
Increase in
performance
from
additional
servers
Percentage gain per additional
server process and/or hardware
node.
Use a well-tuned single application server instance, as in
previous step. Measure how much each additional server
instance and hardware node improves performance.
Safety Margins High
availability
requirements
If the system must cope with
failures, size the system to meet
performance requirements
assuming that one or more
application server instances are
non functional
Dierent equations used if high availability is required.
Excess capacity
for unexpected
peaks
It is desirable to operate a server
at less than its benchmarked
peak, for some safety margin
80% system capacity utilization at peak loads may work for most
installations. Measure your deployment under real and
simulated peak loads.
Capacity Planning
The previous discussion guides you towards dening a deployment architecture. However, you
determine the actual size of the deployment by a process called capacity planning. Capacity
planning enables you to predict:
■
The performance capacity of a particular hardware conguration.
■
The hardware resources required to sustain specied application load and performance.
You can estimate these values through careful performance benchmarking, using an
application with realistic data sets and workloads.
General Tuning Concepts
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 200924










