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

Tuning the Java Runtime System
This chapter discusses the following topics:
■
“Java Virtual Machine Settings” on page 83
■
“Managing Memory and Garbage Collection” on page 84
■
“Further Information” on page 91
Java Virtual Machine Settings
J2SE 5.0 provides two implementations of the HotSpot Java virtual machine (JVM):
■
The client VM is tuned for reducing start-up time and memory footprint. Invoke it by using
the -client JVM command-line option.
■
The server VM is designed for maximum program execution speed. Invoke it by using the
-server JVM command-line option.
By default, the Application Server uses the JVM setting appropriate to the purpose:
■
Developer Prole, targeted at application developers, uses the -client JVM ag to optimize
startup performance and conserve memory resources.
■
Enterprise Prole, targeted at production deployments, uses the default JVM startup mode.
By default, Application Server uses the client Hotspot VM. However, if a server VM is
needed, it can be specied by creating a <jvm-option> named “-server.”
You can override the default by changing the JVM settings in the Admin Console under
Congurations > cong-name > JVM Settings (JVM Options).
For more information on server-class machine detection in J2SE 5.0, see
Server-Class Machine
Detection .
For more information on JVMs, see
JavaTM Virtual Machines.
4
CHAPTER 4
83










