Manuals
/
Sun Microsystems
/
Computer Equipment
/
Server
Sun Microsystems
820434310
manual
122
Models:
820434310
1
122
128
128
Download
128 pages
34.03 Kb
119
120
121
122
123
124
125
126
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 122
Image 122
122
Page 121
Page 123
Page 122
Image 122
Page 121
Page 123
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
Sun Welcomes Your Comments
Documentation, Support, and Training
Third-Party Web Site References
1Performance Tuning Roadmap
Process Overview
Performance Tuning Sequence
Performance Tuning Roadmap
Understanding Operational Requirements
Application Architecture
Client-Side Presentation
Encryption
User Authentication and Authorization
Security Requirements
Hardware Resources
General Tuning Concepts
Administration
Capacity Planning
2Factors That Affect Performance
User Expectations
To Determine Capacity
Further Information
Use StringBuffer to Concatenate Strings
Java Programming Guidelines
Avoid Serialization and Deserialization
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
Optimize SSL
Configuration and Deployment Tips
Disable Security Manager
Monitoring EJB Components
EJB Performance Tuning
Goals
Following is a sample of the monitoring output
Asadmin get -m monitorableObject
Monitoring Individual EJB Components
Use Caching
General Guidelines
Use High Performance Beans
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
Stateful Session Beans
Tuning Tips for Specific Types of EJB Components
Entity Beans
Read-Only Entity Beans
Checkpoint only when needed
Stateless Session 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
Asadmin get -m serverInstance.transaction-service
Tuning the Transaction Service
Disable Distributed Transaction Logging
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
Initial Thread Count
Request Timeout
Thread Count
Max Connections
Keep Alive
Buffer Length
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
Acceptor Threads
Tuning Http Listener Settings
Network Address
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
Controlling connections between client and server ORB
Using multiple connections
Client ORB Properties
Load Balancing
Thread Pool Sizing
Examining Iiop Messages
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
4Connection Pool Sizing
Pool Size Settings
Timeout Settings
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
Additional Information
Choosing the Garbage Collection Algorithm
To use the CMS collector
Other Garbage Collector Settings
Tracing Garbage Collection
1Maximum Address Space Per Process
Tuning the Java Heap
Guidelines for Java Heap Sizing
Heap Tuning Parameters
Xmsvalue Xmxvalue
Survivor Ratio Sizing
Example 4-1Heap Configuration on Solaris
Rebasing DLLs on Windows
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
Networking
Memory
Disk Space
Tuning Parameters
Netstat -nP tcpwc -l
Sizing the Connection Hash Table
Ndd -get /dev/tcp tcpconnhash
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
Session required /lib/security/pamlimits.so
Virtual Memory
Soft Nofile 65535 Hard
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
Start Options
Disk Configuration
Network Configuration
106
Calculating Hadb Data Device Size
Tuning Hadb
Disk Use
Tuning Data Device Size
Hadbm set TotalDatadeviceSizePerNode
Beware last flush/fputs took too long
Memory Allocation
Placing Hadb files on Physical Disks
Vmstat -S
NodeNo TotalSize FreeSize Usage 512 504
Performance
DataBufferPoolSize
Hadbm set DataBufferPoolSize
Tuning DataBufferPoolSize
LogBufferSize
Hadbm resourceinfo --logbuf
Tuning LogBufferSize
InternalLogbufferSize
Node No Avail Free Size
Hadbm resourceinfo --nilogbuf
Tuning InternalLogbufferSize
NumberOfLocks
Hadbm set InternalLogbufferSize
Summary
Tuning NumberOfLocks
Calculating the number of locks
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
Time-based
Tuning Session Persistence Frequency
Web-method
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