Manuals
/
Sun Microsystems
/
Computer Equipment
/
Server
Sun Microsystems
820434310
manual
Figures
Models:
820434310
1
7
128
128
Download
128 pages
34.03 Kb
4
5
6
7
8
9
10
11
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 7
Image 7
Figures
FIGURE
1–1
Java EE Application Model
20
7
Page 6
Page 8
Page 7
Image 7
Page 6
Page 8
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
Table P-3Typographic Conventions
Symbol Conventions
Symbol Conventions
Typographic 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
Declare Constants as static final
String str = testing str = str + abc
Assign null to Variables That Are No Longer Needed
Declare Methods as final Only If Necessary
Use DataHandlers for Soap Attachments
Java Server Page and Servlet Tuning
Synchronize Only When Necessary
Declare Method Arguments final
Http Session Handling
Suggested Coding Practices
General Guidelines
Avoid Shared Modified Class Variables
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
Remove Unneeded Stateful Session Beans
Using Local and Remote Interfaces
Cache and Pool Tuning Tips
Use the Appropriate Stubs
Prefer Local Interfaces
Using Pass-By-Reference Semantics
Improving Performance of EJB Transactions
Version Consistency
Using Special Techniques
Configure Jdbc Resources as One-Phase Commit Resources
Use the Least Expensive Transaction Attribute
Entity-mapping cmp-field-mapping
Cmp-field-mapping consistency
To enable request partitioning
When new.VCVERSIONNUMBER = old.VCVERSIONNUMBER Declare
Request Partitioning
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
Close Connections
Jdbc and Database Access
Use Jdbc Directly
Encapsulate Business Logic in Entity EJB Components
Tune the Message-Driven Bean’s Pool Size
Tuning Message-Driven Beans
Asadmin set server.mdb-container.max-pool-size = value
Use getConnection
Limit Use of JMS Connections
Cache Bean-Specific Resources
Deployment Settings
Tuning the Enterprise Server
Use Pre-compiled JavaServer Pages
Logger Settings
Disable Auto-deployment
Disable Dynamic Application Reloading
Log Levels
Web Container Settings
General Settings
Session Properties Session Timeout
Manager Properties Reap Interval
Disable Dynamic JSP Reloading
Overview of EJB Pooling and Caching
EJB Container Settings
Tuning the EJB Container
Monitoring the EJB Container
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
Viewing Monitoring Information
Java Message Service Settings
Transaction Service Settings
Monitoring the Transaction Service
Disable Distributed Transaction Logging
Tuning the Transaction Service
Asadmin get -m serverInstance.transaction-service
Keypoint Interval
Http Service Settings
Monitoring the Http Service
Recover On Restart Automatic Recovery
DNS Cache Information dns
Enabled
List --user admin --port
Property name=statsProfilingEnabled value=false
NameLookups
HitRatio
Caching DNS Entries
Limit DNS Lookups to Asynchronous
Keep Alive keep-alive
File Cache Information file-cache
Request Processing
Tuning the Http Service
Access Log
Connection Queue
Thread Count
Request Timeout
Initial Thread Count
Buffer Length
Keep Alive
Max Connections
Time Out
DNS Lookup Enabled
Http Protocol
Http File Cache
Small/Medium File Size and File Size Limit
Max Files Count
Hash Init Size
Max Age
Network Address
Tuning Http Listener Settings
Acceptor Threads
Monitoring the ORB
ORB Settings
Overview
How a Client Connects to the ORB
Thread Pools
Tuning the ORB
3Tunable ORB Settings
Connection Statistics
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
Using JSG for Application Clients
Thread Pool Settings
Tuning Thread Pools Unix /Linux only
To Enable Java Serialization
Monitoring Jdbc Connection Pools
Jdbc Connection Pool Settings
Tuning Jdbc Connection Pools
Resources
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
Network Interface
Disk I/O Settings
TCP/IP Settings
To tune the TCP/IP settings
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
Vmstat -S
Memory Allocation
Placing Hadb files on Physical Disks
Beware last flush/fputs took too long
DataBufferPoolSize
Performance
NodeNo TotalSize FreeSize Usage 512 504
LogBufferSize
Tuning DataBufferPoolSize
Hadbm set DataBufferPoolSize
Node No Avail Free Size
Tuning LogBufferSize
InternalLogbufferSize
Hadbm resourceinfo --logbuf
Hadbm set InternalLogbufferSize
Tuning InternalLogbufferSize
NumberOfLocks
Hadbm resourceinfo --nilogbuf
Calculating the number of locks
Tuning NumberOfLocks
Summary
Node No Avail Free Waits 50000
Timeouts
Jdbc connection pool timeouts
Load Balancer timeouts
No space left on device
Tuning the Enterprise Server for High-Availability
Operating System Configuration
Hadb timeouts
Web-method
Tuning Session Persistence Frequency
Time-based
Modified-session
Session Persistence Scope
Session Size
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