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