Manuals
/
Sun Microsystems
/
Computer Equipment
/
Server
Sun Microsystems
820434310 manual Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
Models:
820434310
1
1
128
128
Download
128 pages
34.03 Kb
1
2
3
4
5
6
7
8
<
>
Install
FAQ
Heap Configuration on Solaris
Check the speed again using the hdparm command
Default Paths and File Names
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
“Deployment Settings” on page “Logger Settings” on page
Recover On Restart Automatic Recovery
Symbol Conventions
How to
Page 1
Image 1
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
Sun Microsystems, Inc.
4150 Network Circle
Santa Clara, CA 95054
U.S.A.
Part No:
820–4343–10
January 2009
Page 2
Page 1
Image 1
Page 2
Contents
Sun Microsystems, Inc 4150 Network Circle Santa Clara, CA U.S.A
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
This distribution may include materials developed by third parties
Contents
Tuning Tips for Specific Types of EJB Components
Thread Pool Settings
Contents
Java Virtual Machine Settings
Solaris 10 Platform-Specific Tuning Information
6 Tuning for High-Availability
Java EE Application Model
Figures
Page
Tuning 64-bit Systems for Performance Benchmarking
Performance Tuning Roadmap
Tables
Page
Heap Configuration on Solaris
Examples
Heap Configuration on Windows
Page
Sun GlassFish Enterprise Server Documentation Set
Preface
TABLE P-2 Default Paths and File Names
Default Paths and File Names
TABLE P-1 Books in the Enterprise Server Documentation Set
Continued
Typographic Conventions
Symbol Conventions
The following table explains symbols that might be used in this book
Symbol Conventions
Third-Party Web Site References
Documentation, Support, and Training
Sun Welcomes Your Comments
Indicates menu item
“General Tuning Concepts” on page “Further Information” on page
Tuning
Process Overview
“Process Overview” on page
Performance Tuning Roadmap
Performance Tuning Sequence
Application Architecture
Understanding Operational Requirements
“Application Architecture” on page “Security Requirements” on page
“Hardware Resources” on page
Server-Side Presentation
Client-Side Presentation
Server-Side Enterprise Business Logic Information System
Browser
Security Requirements
User Authentication and Authorization
Encryption
Hardware Resources
Administration
General Tuning Concepts
Administration Guide
Capacity Planning
To Determine Capacity
User Expectations
1 Determine performance on a single CPU
2 Determine vertical scalability
Further Information
Further Information
“Java Server Page and Servlet Tuning” on page
Tuning Your Application
“EJB Performance Tuning” on page
Java Programming Guidelines
Declare Methods as final Only If Necessary
Assign null to Variables That Are No Longer Needed
Declare Constants as static final
Avoid Finalizers
Synchronize Only When Necessary
Java Server Page and Servlet Tuning
Declare Method Arguments final
Use DataHandlers for SOAP Attachments
General Guidelines
Suggested Coding Practices
Avoid Shared Modified Class Variables
HTTP Session Handling
Disable Security Manager
Configuration and Deployment Tips
Optimize SSL
“Using Local and Remote Interfaces” on page
EJB Performance Tuning
“Using Special Techniques” on page
“Tuning Tips for Specific Types of EJB Components” on page
The following is a sample of the monitoring output
Monitoring Individual EJB Components
Use High Performance Beans
General Guidelines
Use Caching
Cache and Pool Tuning Tips
Using Local and Remote Interfaces
Use the Appropriate Stubs
Remove Unneeded Stateful Session Beans
Prefer Local Interfaces
Using Pass-By-Reference Semantics
Improving Performance of EJB Transactions
Use XA-Capable Data Sources Only When Needed
Use Container-Managed Transactions
Don’t Encompass User Input Time
Configure JDBC Resources as One-Phase Commit Resources
Using Special Techniques
Use the Least Expensive Transaction Attribute
Version Consistency
Otherwise, ejbStore stores the data and completes as normal
Request Partitioning
To enable request partitioning
2 Add the additional threadpool IDs to the Application Server’s ORB
Entity Beans
Tuning Tips for Specific Types of EJB Components
Stateful Session Beans
4 Restart the Application Server
Stateless Session Beans
Checkpoint only when needed
Read-Only Entity Beans
Refresh period
Pre-fetching Container Managed Relationship CMR Beans
This clause indicates an outer join. These OrderLines are pre-fetched
Use JDBC Directly
JDBC and Database Access
Encapsulate Business Logic in Entity EJB Components
Close Connections
Use getConnection
Tuning Message-Driven Beans
Tune the Message-Driven Bean’s Pool Size
Limit Use of JMS Connections
Cache Bean-Specific Resources
Deployment Settings
Tuning the Enterprise Server
“Deployment Settings” on page “Logger Settings” on page
“Web Container Settings” on page “EJB Container Settings” on page
Disable Auto-deployment
Logger Settings
Disable Dynamic Application Reloading
Use Pre-compiled JavaServer Pages
General Settings
Web Container Settings
Session Properties Session Timeout
“Session Properties Session Timeout” on page
Manager Properties Reap Interval
Disable Dynamic JSP Reloading
Tuning the EJB Container
EJB Container Settings
Monitoring the EJB Container
Overview of EJB Pooling and Caching
EJB Pool Settings
Tuning the EJB Pool
EJB Cache Settings
Tuning the EJB Cache
Removal Timeout
Pool and Cache Settings for Individual EJB Components
Timeout
Max Cache Size
Determining the best commit option
Commit Option
Transaction Service Settings
Java Message Service Settings
Monitoring the Transaction Service
Viewing Monitoring Information
Disable Distributed Transaction Logging
Tuning the Transaction Service
Monitoring the HTTP Service
HTTP Service Settings
Recover On Restart Automatic Recovery
“Monitoring the HTTP Service” on page
DNS Cache Information dns
Enabled
CacheEntries CurrentCacheEntries / MaxCacheEntries
“DNS Cache Information dns” on page
Caching DNS Entries
HitRatio
Limit DNS Lookups to Asynchronous
NameLookups
Keep Alive keep-alive
File Cache Information file-cache
Access Log
Tuning the HTTP Service
“Access Log” on page “Request Processing” on page
Connection Queue
Thread Count
Request Timeout
Initial Thread Count
Buffer Length
Keep Alive
Max Connections
HTTP Protocol
DNS Lookup Enabled
HTTP File Cache
Time Out
Hash Init Size
Max Files Count
Max Age
Small/Medium File Size and File Size Limit
Network Address
Tuning HTTP Listener Settings
Acceptor Threads
Overview
ORB Settings
How a Client Connects to the ORB
Monitoring the ORB
Connection Statistics
Tuning the ORB
Thread Pools
ORB Thread Pool Parameters
Tunable ORB Parameters
Client ORB Properties
Using multiple connections
Controlling connections between client and server ORB
Examining IIOP Messages
Thread Pool Sizing
Load Balancing
Improving ORB Performance with Java Serialization
Tuning Thread Pools Unix /Linux only
Thread Pool Settings
To Enable Java Serialization
Using JSG for Application Clients
Tuning JDBC Connection Pools
JDBC Connection Pool Settings
“Pool Size Settings” on page
Resources
Timeout Settings
Pool Size Settings
“Timeout Settings” on page
“Isolation Level Settings” on page
Connection Validation Settings
Isolation Level Settings
Transaction Support
Connector Connection Pool Settings
Chapter 3 Tuning the Enterprise Server
asadmin create-connector-connection-pool --raname jdbcra
connectiondefinition javax.sql.DataSource
transactionsupport LocalTransaction TESTPOOL
Page
Java Virtual Machine Settings
Tuning the Java Runtime System
“Java Virtual Machine Settings” on page
“Managing Memory and Garbage Collection” on page
“Other Garbage Collector Settings” on page
Tuning the Garbage Collector
“Tuning the Java Heap” on page “Rebasing DLLs on Windows” on page
Managing Memory and Garbage Collection
2 Configure HADB timeouts, as described in the Administration Guide
1 Make sure that the system is not using 100 percent of its CPU
3 Configure the CMS collector in the server instance
Choosing the Garbage Collection Algorithm
Tracing Garbage Collection
Other Garbage Collector Settings
“Heap Tuning Parameters” on page
Tuning the Java Heap
Guidelines for Java Heap Sizing
“Guidelines for Java Heap Sizing” on page
Xmsvalue Xmxvalue
Heap Tuning Parameters
Survivor Ratio Sizing
Rebasing DLLs on Windows
To rebase the Application Server’s DLLs
1 Make installdir\ bin the default directory. cd installdir\bin
5 Restart the Application Server
Example 4-2 Heap Configuration on Windows
Java HotSpot VM Options
Frequently Asked Questions About the Java HotSpot Virtual Machine
Performance Documentation for the Java HotSpot VM
Java performance web page
Page
“Solaris 10 Platform-Specific Tuning Information” on page
Tuning the Operating System and Platform
“Tuning for the Solaris OS” on page “Linux Configuration” on page
“Tuning for Solaris on x86” on page
Disk Space
Memory
Networking
Npeakr / t
Tuning for the Solaris OS
Solaris 10 Platform-Specific Tuning Information
Tuning Parameters
“Tuning Parameters” on page “File Descriptor Setting” on page
on page
Sizing the Connection Hash Table
File Descriptor Setting
Linux Configuration
“File Descriptors” on page “IP Stack Settings” on page
Tuning for Solaris on
File Descriptors
IP Stack Settings
“Network Interface” on page “Disk I/O Settings” on page
Tuning for Linux platforms
“TCP/IP Settings” on page
“File Descriptors” on page “Virtual Memory” on page
Virtual Memory
TCP/IP Settings
Disk I/O Settings
To tune the TCP/IP settings
2 Enable direct memory access DMA
Tuning Operating System and TCP Settings
Tuning UltraSPARC T1-Based Systems
4 Reboot the system
2 Add the following to /etc/sysctl.conf
Note that the IPGE driver version is
TABLE 5-2 Tuning 64-bit Systems for Performance Benchmarking
Network Configuration
Disk Configuration
Start Options
LDPRELOAD32=/usr/lib/mpss.so.1 export LDPRELOAD32 export MPSSHEAP=4M
Tuning HADB
Tuning for High-Availability
“Tuning HADB” on page
“Tuning the Enterprise Server for High-Availability” on page
hadbm set TotalDatadeviceSizePerNode
Tuning Data Device Size
Placing HADB files on Physical Disks
Memory Allocation
Performance
“Timeouts” on page
DataBufferPoolSize
“DataBufferPoolSize” on page “LogBufferSize” on page
LogBufferSize
Tuning DataBufferPoolSize
InternalLogbufferSize
Tuning LogBufferSize
NumberOfLocks
Tuning InternalLogbufferSize
Calculating the number of locks
Tuning NumberOfLocks
Summary
JDBC connection pool timeouts
Timeouts
Load Balancer timeouts
Operating System Configuration
Tuning the Enterprise Server for High-Availability
HADB timeouts
“Tuning Session Persistence Frequency” on page
Web-method
Tuning Session Persistence Frequency
Time-based
Session Size
Session Persistence Scope
session
modified-session
Checkpointing Stateful Session Beans
Configuring the JDBC Connection Pool
Enabling the Health Checker
Configuring the Load Balancer
Connection Pools” on page
health-checker
Page
caching Continued servlet results, 31 capacity planning
Index
Page
Page
monitoring Continued transaction service
Page
x86 XA-capable data sources, 38-39 -Xms Xmx, 88
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide January
Index