Chapter 11. Tuning Performance by Tweaking Apache's Configuration
When you implement mod_perl on your system, it's very important to go through the default configuration file (httpd.conf), because most of the default settings were designed without mod_perl in mind. Some variables (such as MaxClients) should be adapted to the capabilities of your system, while some (such as KeepAlive, in many cases) should be disabled, because although they can improve performance for a plain Apache server, they can reduce performance for a mod_perl server.
Correct configuration of the MinSpareServers, MaxSpareServers, StartServers, MaxClients, and MaxRequestsPerChild parameters is very important. If they are too low, you will under-use the system's capabilities. If they are too high, it is likely that the server will bring the machine to its knees.
The KeepAlive directive improves the performance of a plain Apache server by saving the TCP handshake if the client requests more than one object from your server. But you don't want this option to be enabled under mod_perl, since it will keep a large mod_perl process tied to the client and do nothing while waiting for the timeout to occur.
We will talk about these and other issues in the following sections.