Optimizing Apache
Apache can be tweaked by changing a few of its settings to make it work faster with respect to the capability your server possess.
Some of the values that can be tweaked in the ‘Global’ section of Apache configuration file (found at /usr/local/apache/conf/httpd.conf) are explained below:
Timeout
This directive sets the maximum amount of time the server will allow a connection to remain open. The default value of 1200 (20 minutes) is appropriate for most instances.
KeepAlive
With this directive set to on, the server will attempt to record the userid of each query to the server. Keep this directive set to off unless you are willing to devote a significant amount of network bandwidth to this function.
MaxSpareServers and MinSpareServers
Apache has several statements to configure the number of clients being handled and the number of child-processes it forks off to deal with those requests. If the machine running the Apache installation is not intended for anything but running Apache, it is generally a good idea to make these numbers as high as possible, but not so high that the machine starts paging memory out to its swap space.
MaxRequestsPerChild
The MaxRequestsPerChild directive sets the limit on the number of requests that an individual child process can handle during its lifetime. After MaxRequestsPerChild requests, the child process will die. If MaxRequestsPerChild is zero, the process will live until the server kills it (because it is no longer needed, which will depend on the value of MinSpareServers and the number of current requests) or until the server itself is stopped.
Leave a Reply
You must be logged in to post a comment.