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

Network Interface
To ensure that the network interface is operating in full duplex mode, add the following entry
into /etc/rc.local:
mii-tool -F 100baseTx-FD eth0
where eth0 is the name of the network interface card (NIC).
Disk I/O Settings
▼
To tune disk I/O performance for non SCSI disks
Test the disk speed.
Use this command:
/sbin/hdparm -t /dev/hdX
Enable direct memory access (DMA).
Use this command:
/sbin/hdparm -d1 /dev/hdX
Check the speed again using the hdparm command.
Given that DMA is not enabled by default, the transfer rate might have improved considerably.
In order to do this at every reboot, add the /sbin/hdparm -d1 /dev/hdX line to
/etc/conf.d/local.start, /etc/init.d/rc.local, or whatever the startup script is called.
For information on SCSI disks, see:
System Tuning for Linux Servers — SCSI.
TCP/IP Settings
▼
To tune the TCP/IP settings
Add the following entry to /etc/rc.local
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 60000 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 15000 > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
1
2
3
1
Tuning for Linux platforms
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009102










