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
Default Paths and File Names
Symbol Conventions
Administration
Linux Configuration
Jdbc and Database Access
Request Timeout
Tuning the Enterprise Server
Deployment Settings
How to
Monitoring the Http Service
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 1
Page 2
Page 1
Image 1
Page 1
Page 2
Contents
Sun Microsystems, Inc Network Circle Santa Clara, CA
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
090304@21990
Contents
Tuning the Enterprise Server
100
Tuning for High-Availability
Figures
Page
Tables
Page
Examples
Page
Table P-1Books in the Enterprise Server Documentation Set
Sun GlassFish Enterprise Server Documentation Set
Table P-2Default Paths and File Names
Default Paths and File Names
Symbol Conventions
Symbol Conventions
Typographic Conventions
Table P-3Typographic Conventions
Third-Party Web Site References
Documentation, Support, and Training
Sun Welcomes Your Comments
Process Overview
1Performance Tuning Roadmap
Performance Tuning Roadmap
Performance Tuning Sequence
Application Architecture
Understanding Operational Requirements
Client-Side Presentation
Security Requirements
User Authentication and Authorization
Encryption
Hardware Resources
Administration
General Tuning Concepts
2Factors That Affect Performance
Capacity Planning
To Determine Capacity
User Expectations
Further Information
Avoid Serialization and Deserialization
Java Programming Guidelines
Use StringBuffer to Concatenate Strings
Assign null to Variables That Are No Longer Needed
String str = testing str = str + abc
Declare Methods as final Only If Necessary
Declare Constants as static final
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
Goals
EJB Performance Tuning
Monitoring EJB Components
Following is a sample of the monitoring output
Monitoring Individual EJB Components
Asadmin get -m monitorableObject
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
Configure Jdbc Resources as One-Phase Commit Resources
Using Special Techniques
Use the Least Expensive Transaction Attribute
Version Consistency
Entity-mapping cmp-field-mapping
When new.VCVERSIONNUMBER = old.VCVERSIONNUMBER Declare
To enable request partitioning
Request Partitioning
Cmp-field-mapping consistency
Entity Beans
Tuning Tips for Specific Types of EJB Components
Stateful Session Beans
Stateless Session Beans
Checkpoint only when needed
Read-Only Entity Beans
Refresh period
Pre-fetching Container Managed Relationship CMR Beans
OrderTable.OrderID = OrderLineTable.OrderLineOrderID
Use Jdbc Directly
Jdbc and Database Access
Encapsulate Business Logic in Entity EJB Components
Close Connections
Asadmin set server.mdb-container.max-pool-size = value
Tuning Message-Driven Beans
Use getConnection
Tune the Message-Driven Bean’s Pool Size
Limit Use of JMS Connections
Cache Bean-Specific Resources
Deployment Settings
Tuning the Enterprise Server
Disable Auto-deployment
Logger Settings
Disable Dynamic Application Reloading
Use Pre-compiled JavaServer Pages
General Settings
Web Container Settings
Session Properties Session Timeout
Log Levels
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
Pool and Cache Settings for Individual EJB Components
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
Asadmin get -m serverInstance.transaction-service
Monitoring the Http Service
Http Service Settings
Recover On Restart Automatic Recovery
Keypoint Interval
List --user admin --port
Enabled
Property name=statsProfilingEnabled value=false
DNS Cache Information dns
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
Connection Queue
Request Processing
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
3Tunable ORB Settings
Tuning the ORB
Connection Statistics
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
Resources
Monitoring Jdbc Connection Pools
Timeout Settings
Pool Size Settings
4Connection Pool Sizing
Connection Validation Settings
Isolation Level Settings
Transaction Support
Connector Connection Pool Settings
Testpool
Page
Java Virtual Machine Settings
Tuning the Java Runtime System
Managing Memory and Garbage Collection
Tuning the Garbage Collector
To use the CMS collector
Choosing the Garbage Collection Algorithm
Additional Information
Tracing Garbage Collection
Other Garbage Collector Settings
Guidelines for Java Heap Sizing
Tuning the Java Heap
1Maximum Address Space Per Process
Xmsvalue Xmxvalue
Heap Tuning Parameters
Rebasing DLLs on Windows
Example 4-1Heap Configuration on Solaris
Survivor Ratio Sizing
To rebase the Application Server’s DLLs
Enter this command rebase -b 0x6000000 *.dll
For more information on tuning the JVM, see
Page
Processors
Server Scaling
Disk Space
Memory
Networking
Tuning Parameters
Ndd -get /dev/tcp tcpconnhash
Sizing the Connection Hash Table
Netstat -nP tcpwc -l
File Descriptor Setting
Linux Configuration
File Descriptors on IP Stack Settings on
Tuning for Solaris on
File Descriptors
IP Stack Settings
Tuning for Linux platforms
Soft Nofile 65535 Hard
Virtual Memory
Session required /lib/security/pamlimits.so
TCP/IP Settings
Disk I/O Settings
To tune the TCP/IP settings
Network Interface
Tuning Operating System and TCP Settings
Tuning UltraSPARC T1-Based Systems
2Tuning 64-bit Systems for Performance Benchmarking
Network Configuration
Disk Configuration
Start Options
106
Disk Use
Tuning Hadb
Calculating Hadb Data Device Size
Hadbm set TotalDatadeviceSizePerNode
Tuning Data Device Size
Placing Hadb files on Physical Disks
Memory Allocation
Beware last flush/fputs took too long
Vmstat -S
DataBufferPoolSize
Performance
NodeNo TotalSize FreeSize Usage 512 504
LogBufferSize
Tuning DataBufferPoolSize
Hadbm set DataBufferPoolSize
InternalLogbufferSize
Tuning LogBufferSize
Hadbm resourceinfo --logbuf
Node No Avail Free Size
NumberOfLocks
Tuning InternalLogbufferSize
Hadbm resourceinfo --nilogbuf
Hadbm set InternalLogbufferSize
Calculating the number of locks
Tuning NumberOfLocks
Summary
Jdbc connection pool timeouts
Timeouts
Load Balancer timeouts
Node No Avail Free Waits 50000
Operating System Configuration
Tuning the Enterprise Server for High-Availability
Hadb timeouts
No space left on device
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
Tuning for High-Availability 121
122
Index
Index
125
Monitoring transaction service
Session timeout
128
Top
Page
Image
Contents