Here, we go over optimum parameters for
web services. Note that Unix systems are shipped with a generic
kernel, optimized not for any particular use, but for acceptable
performance for general use. See Chapter 10 for
information on configuring TCP. You can see the current settings in a
Solaris system by viewing /etc/system or
grepping for “ndd” from
general, Solaris 2.6 is already tuned for web services, so you
shouldn’t have to modify anything to get the best performance.
Here are a few of the most basic parameters you may want to tune on
Linux or another OS. Remember to back up your kernel and
configuration files before changing anything:
descriptors are positive integers by which the kernel keeps track of
open files and network connections per process. If your web server
software has a very large number of open files and connections in a
process, it is possible to run out of file descriptors, meaning that
you will not be able to accept new connections until old connections
terminate and give up their descriptors. In programmer’s terms,
system call will fail. What happens
after that depends on your version of Unix; it may log an error to
the system log or print a message on the console, among other things.
Old versions of Unix had a file descriptor limit of 20 (as
limits.h for SVR4), but every system has increased it far beyond that. It is not unreasonable to want several thousand ...