Server User Manual
Table Of Contents
- Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
- Preface
- Overview of Enterprise Server Performance Tuning
- Tuning Your Application
- Java Programming Guidelines
- Java Server Page and Servlet Tuning
- EJB Performance Tuning
- Goals
- Monitoring EJB Components
- General Guidelines
- Using Local and Remote Interfaces
- Improving Performance of EJB Transactions
- Use Container-Managed Transactions
- Don’t Encompass User Input Time
- Identify Non-Transactional Methods
- Use TX_REQUIRED for Long Transaction Chains
- Use Lowest Cost Database Locking
- Use XA-Capable Data Sources Only When Needed
- Configure JDBC Resources as One-Phase Commit Resources
- Use the Least Expensive Transaction Attribute
- Using Special Techniques
- Tuning Tips for Specific Types of EJB Components
- JDBC and Database Access
- Tuning Message-Driven Beans
- Tuning the Enterprise Server
- Deployment Settings
- Logger Settings
- Web Container Settings
- EJB Container Settings
- Java Message Service Settings
- Transaction Service Settings
- HTTP Service Settings
- ORB Settings
- Thread Pool Settings
- Resources
- Tuning the Java Runtime System
- Tuning the Operating System and Platform
- Tuning for High-Availability
- Index

TABLE 5–1 Tuning Parameters for Solaris (Continued)
Parameter Scope Default Tuned Value Comments
tcp_conn_req_max_q ndd /dev/tcp 128 1024
tcp_conn_req_max_q0 ndd /dev/tcp 1024 4096
tcp_ip_abort_interval ndd /dev/tcp 480000 60000
tcp_keepalive_interval ndd /dev/tcp 7200000 900000 For high trac web sites, lower this
value.
tcp_rexmit_interval_initial ndd /dev/tcp 3000 3000 If retransmission is greater than
30-40%, you should increase this
value.
tcp_rexmit_interval_max ndd /dev/tcp 240000 10000
tcp_rexmit_interval_min ndd /dev/tcp 200 3000
tcp_smallest_anon_port ndd /dev/tcp 32768 1024 Set on clients too.
tcp_slow_start_initial ndd /dev/tcp 1 2 Slightly faster transmission of small
amounts of data.
tcp_xmit_hiwat ndd /dev/tcp 8129 32768 Size of transmit buer.
tcp_recv_hiwat ndd /dev/tcp 8129 32768 Size of receive buer.
tcp_conn_hash_size ndd /dev/tcp 512 8192 Size of connection hash table. See
“Sizing the Connection Hash Table”
on page 96
.
Sizing the Connection Hash Table
The connection hash table keeps all the information for active TCP connections. Use the
following command to get the size of the connection hash table:
ndd -get /dev/tcp tcp_conn_hash
This value does not limit the number of connections, but it can cause connection hashing to
take longer. The default size is 512.
To make lookups more ecient, set the value to half of the number of concurrent TCP
connections that are expected on the server. You can set this value only in /etc/system, and it
becomes eective at boot time.
Use the following command to get the current number of TCP connections.
netstat -nP tcp|wc -l
Tuning for the Solaris OS
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 200996










