Manuals
/
Sun Microsystems
/
Computer Equipment
/
Server
Sun Microsystems
820434310
manual
Models:
820434310
1
12
128
128
Download
128 pages
34.03 Kb
9
10
11
12
13
14
15
16
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 12
Image 12
12
Page 11
Page 13
Page 12
Image 12
Page 11
Page 13
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
Symbol Conventions
Symbol Conventions
Typographic Conventions
Table P-3Typographic Conventions
Documentation, Support, and Training
Third-Party Web Site References
Sun Welcomes Your Comments
1Performance Tuning Roadmap
Process Overview
Performance Tuning Sequence
Performance Tuning Roadmap
Understanding Operational Requirements
Application Architecture
Client-Side Presentation
User Authentication and Authorization
Security Requirements
Encryption
Hardware Resources
General Tuning Concepts
Administration
Capacity Planning
2Factors That Affect Performance
User Expectations
To Determine Capacity
Further Information
Java Programming Guidelines
Avoid Serialization and Deserialization
Use StringBuffer to Concatenate Strings
String str = testing str = str + abc
Assign null to Variables That Are No Longer Needed
Declare Methods as final Only If Necessary
Declare Constants as static final
Java Server Page and Servlet Tuning
Synchronize Only When Necessary
Declare Method Arguments final
Use DataHandlers for Soap Attachments
Suggested Coding Practices
General Guidelines
Avoid Shared Modified Class Variables
Http Session Handling
Configuration and Deployment Tips
Disable Security Manager
Optimize SSL
EJB Performance Tuning
Goals
Monitoring EJB Components
Following is a sample of the monitoring output
Asadmin get -m monitorableObject
Monitoring Individual EJB Components
General Guidelines
Use High Performance Beans
Use Caching
Using Local and Remote Interfaces
Cache and Pool Tuning Tips
Use the Appropriate Stubs
Remove Unneeded Stateful Session Beans
Using Pass-By-Reference Semantics
Prefer Local Interfaces
Improving Performance of EJB Transactions
Using Special Techniques
Configure Jdbc Resources as One-Phase Commit Resources
Use the Least Expensive Transaction Attribute
Version Consistency
Entity-mapping cmp-field-mapping
To enable request partitioning
When new.VCVERSIONNUMBER = old.VCVERSIONNUMBER Declare
Request Partitioning
Cmp-field-mapping consistency
Tuning Tips for Specific Types of EJB Components
Entity Beans
Stateful Session Beans
Checkpoint only when needed
Stateless Session Beans
Read-Only Entity Beans
Pre-fetching Container Managed Relationship CMR Beans
Refresh period
OrderTable.OrderID = OrderLineTable.OrderLineOrderID
Jdbc and Database Access
Use Jdbc Directly
Encapsulate Business Logic in Entity EJB Components
Close Connections
Tuning Message-Driven Beans
Asadmin set server.mdb-container.max-pool-size = value
Use getConnection
Tune the Message-Driven Bean’s Pool Size
Cache Bean-Specific Resources
Limit Use of JMS Connections
Tuning the Enterprise Server
Deployment Settings
Logger Settings
Disable Auto-deployment
Disable Dynamic Application Reloading
Use Pre-compiled JavaServer Pages
Web Container Settings
General Settings
Session Properties Session Timeout
Log Levels
Disable Dynamic JSP Reloading
Manager Properties Reap Interval
EJB Container Settings
Tuning the EJB Container
Monitoring 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
Java Message Service Settings
Transaction Service Settings
Monitoring the Transaction Service
Viewing Monitoring Information
Tuning the Transaction Service
Disable Distributed Transaction Logging
Asadmin get -m serverInstance.transaction-service
Http Service Settings
Monitoring the Http Service
Recover On Restart Automatic Recovery
Keypoint Interval
Enabled
List --user admin --port
Property name=statsProfilingEnabled value=false
DNS Cache Information dns
HitRatio
Caching DNS Entries
Limit DNS Lookups to Asynchronous
NameLookups
File Cache Information file-cache
Keep Alive keep-alive
Tuning the Http Service
Access Log
Connection Queue
Request Processing
Request Timeout
Thread Count
Initial Thread Count
Keep Alive
Buffer Length
Max Connections
DNS Lookup Enabled
Http Protocol
Http File Cache
Time Out
Max Files Count
Hash Init Size
Max Age
Small/Medium File Size and File Size Limit
Tuning Http Listener Settings
Network Address
Acceptor Threads
ORB Settings
Overview
How a Client Connects to the ORB
Monitoring the ORB
Tuning the ORB
3Tunable ORB Settings
Connection Statistics
Thread Pools
Tunable ORB Parameters
ORB Thread Pool Parameters
Using multiple connections
Client ORB Properties
Controlling connections between client and server ORB
Thread Pool Sizing
Examining Iiop Messages
Load Balancing
Improving ORB Performance with Java Serialization
Thread Pool Settings
Tuning Thread Pools Unix /Linux only
To Enable Java Serialization
Using JSG for Application Clients
Jdbc Connection Pool Settings
Tuning Jdbc Connection Pools
Resources
Monitoring Jdbc Connection Pools
Pool Size Settings
Timeout 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
Choosing the Garbage Collection Algorithm
To use the CMS collector
Additional Information
Other Garbage Collector Settings
Tracing Garbage Collection
Tuning the Java Heap
Guidelines for Java Heap Sizing
1Maximum Address Space Per Process
Heap Tuning Parameters
Xmsvalue Xmxvalue
Example 4-1Heap Configuration on Solaris
Rebasing DLLs on Windows
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
Memory
Disk Space
Networking
Tuning Parameters
Sizing the Connection Hash Table
Ndd -get /dev/tcp tcpconnhash
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
Virtual Memory
Soft Nofile 65535 Hard
Session required /lib/security/pamlimits.so
Disk I/O Settings
TCP/IP Settings
To tune the TCP/IP settings
Network Interface
Tuning UltraSPARC T1-Based Systems
Tuning Operating System and TCP Settings
2Tuning 64-bit Systems for Performance Benchmarking
Disk Configuration
Network Configuration
Start Options
106
Tuning Hadb
Disk Use
Calculating Hadb Data Device Size
Tuning Data Device Size
Hadbm set TotalDatadeviceSizePerNode
Memory Allocation
Placing Hadb files on Physical Disks
Beware last flush/fputs took too long
Vmstat -S
Performance
DataBufferPoolSize
NodeNo TotalSize FreeSize Usage 512 504
Tuning DataBufferPoolSize
LogBufferSize
Hadbm set DataBufferPoolSize
Tuning LogBufferSize
InternalLogbufferSize
Hadbm resourceinfo --logbuf
Node No Avail Free Size
Tuning InternalLogbufferSize
NumberOfLocks
Hadbm resourceinfo --nilogbuf
Hadbm set InternalLogbufferSize
Tuning NumberOfLocks
Calculating the number of locks
Summary
Timeouts
Jdbc connection pool timeouts
Load Balancer timeouts
Node No Avail Free Waits 50000
Tuning the Enterprise Server for High-Availability
Operating System Configuration
Hadb timeouts
No space left on device
Tuning Session Persistence Frequency
Web-method
Time-based
Session Persistence Scope
Session Size
Session
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