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

With asadmin, use the following command to list the monitoring parameters available:
list --user admin --port 4848
-m server-instance-name.http-service.*
where server-instance-name is the name of the server instance.
Use the following command to get the values:
get --user admin --port 4848 -m server.http-service.parameter-name.*
where parameter-name is the name of the parameter to monitor.
Statistics collection is enabled by default. Disable it by adding the following property to
domain.xml and restart the server:
<property name="statsProfilingEnabled" value="false" />
Disabling statistics collection will increase performance.
You can also view monitoring statistics with the Admin Console. The information is divided
into the following categories:
■
“DNS Cache Information (dns)” on page 61
■
“File Cache Information (le-cache)” on page 63
■
“Keep Alive (keep-alive)” on page 63
DNS Cache Information (dns)
The DNS cache caches IP addresses and DNS names. Your server’s DNS cache is disabled by
default. In the DNS Statistics for Process ID All page under Monitor in the web-based
Administration interface the following statistics are displayed:
Enabled
If the DNS cache is disabled, the rest of this section is not displayed.
By default, the DNS cache is o. Enable DNS caching with the Admin Console by setting the
DNS value to “Perform DNS lookups on clients accessing the server”.
CacheEntries (CurrentCacheEntries / MaxCacheEntries)
The number of current cache entries and the maximum number of cache entries. A single cache
entry represents a single IP address or DNS name lookup. Make the cache as large as the
maximum number of clients that access your web site concurrently. Note that setting the cache
size too high is a waste of memory and degrades performance.
Set the maximum size of the DNS cache by entering or changing the value in the Size of DNS
Cache eld of the Performance Tuning page.
HTTP Service Settings
Chapter 3 • Tuning the Enterprise Server 61










