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 le descriptors from the default. Having a higher
number of le 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 le 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 les 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 modied using sysctl:
sysctl -a
To load new values from the sysctl.conf le:
sysctl -p /etc/sysctl.conf
To check and modify limits per shell, use the following command:
limit
The output will look something like this:
TuningforLinuxplatforms
SunGlassFishEnterpriseServer2.1PerformanceTuningGuide • January2009100