Manuals
/
Sun Microsystems
/
Computer Equipment
/
Server
Sun Microsystems
820434310
manual
Models:
820434310
1
82
128
128
Download
128 pages
34.03 Kb
79
80
81
82
83
84
85
86
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 82
Image 82
82
Page 81
Page 83
Page 82
Image 82
Page 81
Page 83
Contents
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
Sun Microsystems, Inc Network Circle Santa Clara, CA
090304@21990
Contents
Tuning the Enterprise Server
100
Tuning for High-Availability
Figures
Page
Tables
Page
Examples
Page
Sun GlassFish Enterprise Server Documentation Set
Table P-1Books in the Enterprise Server Documentation Set
Default Paths and File Names
Table P-2Default Paths and File Names
Typographic Conventions
Symbol Conventions
Symbol Conventions
Table P-3Typographic Conventions
Third-Party Web Site References
Documentation, Support, and Training
Sun Welcomes Your Comments
1Performance Tuning Roadmap
Process Overview
Performance Tuning Sequence
Performance Tuning Roadmap
Understanding Operational Requirements
Application Architecture
Client-Side Presentation
Security Requirements
User Authentication and Authorization
Encryption
Hardware Resources
General Tuning Concepts
Administration
Capacity Planning
2Factors That Affect Performance
User Expectations
To Determine Capacity
Further Information
Avoid Serialization and Deserialization
Java Programming Guidelines
Use StringBuffer to Concatenate Strings
Declare Methods as final Only If Necessary
String str = testing str = str + abc
Assign null to Variables That Are No Longer Needed
Declare Constants as static final
Declare Method Arguments final
Java Server Page and Servlet Tuning
Synchronize Only When Necessary
Use DataHandlers for Soap Attachments
Avoid Shared Modified Class Variables
Suggested Coding Practices
General Guidelines
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
Asadmin get -m monitorableObject
Monitoring Individual EJB Components
Use High Performance Beans
General Guidelines
Use Caching
Use the Appropriate Stubs
Using Local and Remote Interfaces
Cache and Pool Tuning Tips
Remove Unneeded Stateful Session Beans
Using Pass-By-Reference Semantics
Prefer Local Interfaces
Improving Performance of EJB Transactions
Use the Least Expensive Transaction Attribute
Using Special Techniques
Configure Jdbc Resources as One-Phase Commit Resources
Version Consistency
Entity-mapping cmp-field-mapping
Request Partitioning
To enable request partitioning
When new.VCVERSIONNUMBER = old.VCVERSIONNUMBER Declare
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
Pre-fetching Container Managed Relationship CMR Beans
Refresh period
OrderTable.OrderID = OrderLineTable.OrderLineOrderID
Encapsulate Business Logic in Entity EJB Components
Jdbc and Database Access
Use Jdbc Directly
Close Connections
Use getConnection
Tuning Message-Driven Beans
Asadmin set server.mdb-container.max-pool-size = value
Tune the Message-Driven Bean’s Pool Size
Cache Bean-Specific Resources
Limit Use of JMS Connections
Tuning the Enterprise Server
Deployment Settings
Disable Dynamic Application Reloading
Logger Settings
Disable Auto-deployment
Use Pre-compiled JavaServer Pages
Session Properties Session Timeout
Web Container Settings
General Settings
Log Levels
Disable Dynamic JSP Reloading
Manager Properties Reap Interval
Monitoring the EJB Container
EJB Container Settings
Tuning the EJB Container
Overview of EJB Pooling and Caching
Tuning the EJB Pool
EJB Pool Settings
Tuning the EJB Cache
EJB Cache Settings
Pool and Cache Settings for Individual EJB Components
Commit Option
Determining the best commit option
Monitoring the Transaction Service
Java Message Service Settings
Transaction Service Settings
Viewing Monitoring Information
Disable Distributed Transaction Logging
Tuning the Transaction Service
Asadmin get -m serverInstance.transaction-service
Recover On Restart Automatic Recovery
Http Service Settings
Monitoring the Http Service
Keypoint Interval
Property name=statsProfilingEnabled value=false
Enabled
List --user admin --port
DNS Cache Information dns
Limit DNS Lookups to Asynchronous
HitRatio
Caching DNS Entries
NameLookups
File Cache Information file-cache
Keep Alive keep-alive
Connection Queue
Tuning the Http Service
Access Log
Request Processing
Thread Count
Request Timeout
Initial Thread Count
Buffer Length
Keep Alive
Max Connections
Http File Cache
DNS Lookup Enabled
Http Protocol
Time Out
Max Age
Max Files Count
Hash Init Size
Small/Medium File Size and File Size Limit
Network Address
Tuning Http Listener Settings
Acceptor Threads
How a Client Connects to the ORB
ORB Settings
Overview
Monitoring the ORB
Connection Statistics
Tuning the ORB
3Tunable ORB Settings
Thread Pools
Tunable ORB Parameters
ORB Thread Pool 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
To Enable Java Serialization
Thread Pool Settings
Tuning Thread Pools Unix /Linux only
Using JSG for Application Clients
Resources
Jdbc Connection Pool Settings
Tuning Jdbc Connection Pools
Monitoring Jdbc Connection Pools
Timeout Settings
Pool Size Settings
4Connection Pool Sizing
Isolation Level Settings
Connection Validation Settings
Connector Connection Pool Settings
Transaction Support
Testpool
Page
Tuning the Java Runtime System
Java Virtual Machine Settings
Tuning the Garbage Collector
Managing Memory and Garbage Collection
To use the CMS collector
Choosing the Garbage Collection Algorithm
Additional Information
Other Garbage Collector Settings
Tracing Garbage Collection
Guidelines for Java Heap Sizing
Tuning the Java Heap
1Maximum Address Space Per Process
Heap Tuning Parameters
Xmsvalue Xmxvalue
Rebasing DLLs on Windows
Example 4-1Heap Configuration on Solaris
Survivor Ratio Sizing
Enter this command rebase -b 0x6000000 *.dll
To rebase the Application Server’s DLLs
For more information on tuning the JVM, see
Page
Server Scaling
Processors
Disk Space
Memory
Networking
Tuning Parameters
Ndd -get /dev/tcp tcpconnhash
Sizing the Connection Hash Table
Netstat -nP tcpwc -l
Linux Configuration
File Descriptor Setting
Tuning for Solaris on
File Descriptors on IP Stack Settings on
IP Stack Settings
File Descriptors
Tuning for Linux platforms
Soft Nofile 65535 Hard
Virtual Memory
Session required /lib/security/pamlimits.so
To tune the TCP/IP settings
Disk I/O Settings
TCP/IP Settings
Network Interface
Tuning UltraSPARC T1-Based Systems
Tuning Operating System and TCP Settings
2Tuning 64-bit Systems for Performance Benchmarking
Network Configuration
Disk Configuration
Start Options
106
Disk Use
Tuning Hadb
Calculating Hadb Data Device Size
Tuning Data Device Size
Hadbm set TotalDatadeviceSizePerNode
Beware last flush/fputs took too long
Memory Allocation
Placing Hadb files on Physical Disks
Vmstat -S
DataBufferPoolSize
Performance
NodeNo TotalSize FreeSize Usage 512 504
LogBufferSize
Tuning DataBufferPoolSize
Hadbm set DataBufferPoolSize
Hadbm resourceinfo --logbuf
Tuning LogBufferSize
InternalLogbufferSize
Node No Avail Free Size
Hadbm resourceinfo --nilogbuf
Tuning InternalLogbufferSize
NumberOfLocks
Hadbm set InternalLogbufferSize
Calculating the number of locks
Tuning NumberOfLocks
Summary
Load Balancer timeouts
Timeouts
Jdbc connection pool timeouts
Node No Avail Free Waits 50000
Hadb timeouts
Tuning the Enterprise Server for High-Availability
Operating System Configuration
No space left on device
Web-method
Tuning Session Persistence Frequency
Time-based
Session
Session Persistence Scope
Session Size
Modified-session
Configuring the Jdbc Connection Pool
Checkpointing Stateful Session Beans
Configuring the Load Balancer
Enabling the Health Checker
Tuning for High-Availability 121
122
Index
Index
125
Monitoring transaction service
Session timeout
128
Top
Page
Image
Contents