Tuning for Linux platforms

Tuning for Linux platforms

To tune for maximum performance on Linux, you need to make adjustments to the following:

“File Descriptors” on page 100

“Virtual Memory” on page 101

“Network Interface” on page 102

“Disk I/O Settings” on page 102

“TCP/IP Settings” on page 102

File Descriptors

You may need to increase the number of file descriptors from the default. Having a higher number of file descriptors ensures that the server can open sockets under high load and not abort requests coming in from clients.

Start by checking system limits for file descriptors with this command:

cat /proc/sys/fs/file-max

8192

The current limit shown is 8192. To increase it to 65535, use the following command (as root):

echo "65535" > /proc/sys/fs/file-max

To make this value to survive a system reboot, add it to /etc/sysctl.conf and specify the maximum number of open files permitted:

fs.file-max = 65535

Note: The parameter is not proc.sys.fs.file-max, as one might expect.

To list the available parameters that can be modified using sysctl:

sysctl -a

To load new values from the sysctl.conf file:

sysctl -p /etc/sysctl.conf

To check and modify limits per shell, use the following command:

limit

The output will look something like this:

100

Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009

Page 100
Image 100
Sun Microsystems 820434310 manual Tuning for Linux platforms