The MinSpareServers directive specifies the minimum number of idle servers that should be maintained in the process pool. These servers are waiting for requests. You specify the number of minimum spare servers to ensure that these servers are always ready to address client requests. The main server process ensures that a minimum number of servers specified in this directive are always kept idle. The default value set for this directive is 5, which means that the main server process will keep a minimum of five servers idle.

The default value was set for this directive after years of testing and observation. Therefore, you might not want to change the default value for the MinSpareServers directive unless required to do so. Consider the following situations in which you might want to change the value of this directive:

  • Using Apache as a production server. If you are using Apache as a production server, chances are your Web server is required to answer thousands of requests at a given time. This means that the server requires more processes to address the high number of connections. You handle this by increasing the number of processes specified in the MinSpareServers directive. As a result, a higher number of idle processes are waiting to process incoming requests, thereby reducing the delay experienced by users (otherwise, extra time would be needed to create another process to address the request).
  • Using Apache on a local area network (LAN). The situation is entirely different when you are using Apache on a LAN. In this case, the connections handled by the Web server will be significantly fewer than those handled by a production server. So, it is advisable to reduce the number of servers specified in the MinSpareServers directive for lightly loaded servers. The idle processes specified in MinSpareServers constantly hog system memory, so you are better off reducing the number of idle processes if you don’t need them.

Post By Editor (2,827 Posts)

Website: →