Tuning for Linux platforms

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

1Test the disk speed.

Use this command:

/sbin/hdparm -t /dev/hdX

2Enable direct memory access (DMA).

Use this command:

/sbin/hdparm -d1 /dev/hdX

3Check 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

1Add 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

102

Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009

Page 102
Image 102
Sun Microsystems 820434310 manual Network Interface, Disk I/O Settings, TCP/IP Settings, To tune the TCP/IP settings