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

▼
To Determine Capacity
Determine performance on a single CPU.
First determine the largest load that a single processor can sustain. You can obtain this gure by
measuring the performance of the application on a single-processor machine. Either leverage
the performance numbers of an existing application with similar processing characteristics or,
ideally, use the actual application and workload in a testing environment. Make sure that the
application and data resources are tiered exactly as they would be in the nal deployment.
Determine vertical scalability.
Determine how much additional performance you gain when you add processors. That is, you
are indirectly measuring the amount of shared resource contention that occurs on the server for
a specic workload. Either obtain this information based on additional load testing of the
application on a multiprocessor system, or leverage existing information from a similar
application that has already been load tested.
Running a series of performance tests on one to eight CPUs, in incremental steps, generally
provides a sense of the vertical scalability characteristics of the system. Be sure to properly tune
the application, Application Server, backend database resources, and operating system so that
they do not skew the results.
Determine horizontal scalability.
If suciently powerful hardware resources are available, a single hardware node may meet the
performance requirements. However for better availability, you can cluster two or more
systems. Employing external load balancers and workload simulation, determine the
performance benets of replicating one well-tuned application server node, as determined in
step (2).
User Expectations
Application end-users generally have some performance expectations. Often you can
numerically quantify them. To ensure that customer needs are met, you must understand these
expectations clearly, and use them in capacity planning.
Consider the following questions regarding performance expectations:
■
What do users expect the average response times to be for various interactions with the
application? What are the most frequent interactions? Are there any extremely time-critical
interactions? What is the length of each transaction, including think time? In many cases,
you may need to perform empirical user studies to get good estimates.
■
What are the anticipated steady-state and peak user loads? Are there are any particular times
of the day, week, or year when you observe or expect to observe load peaks? While there may
be several million registered customers for an online business, at any one time only a
1
2
3
General Tuning Concepts
Chapter 1 • Overview of Enterprise Server PerformanceTuning 25










