Performance Tuning Your Web Server

If you are running a busy web server, it makes sense to do some performance tuning. The default settings are for web servers with an average workload. If you are hosting a busy web server, the performance parameters may need some tuning. The file to do this is the /etc/apache2/server-tuning. conf file. In this file, you can use the following options to tune the performance of your web server:

StartServers: This setting specifies the number of Apache processes that should always be started. The advantage of starting some processes in advance is that they are ready and listening for incoming clients and therefore are capable of replying to incoming connections quickly. By default, five servers are started. If you anticipate your web server will be heavily used, it is a good idea to set this to a greater value.

MinSpareServers: This is the minimal number of servers that should always be ready and waiting for new incoming connections. By default, five servers are always listening and ready for new connections.

MaxSpareServers: When too many server processes are waiting for new client connections that don't come, it may be reasonable to tune the MaxSpareServers setting. Its default value of 10 determines that if more than 10 servers are waiting for new incoming connections, they should be closed down automatically.

ServerLimit: This is the maximum number of clients that Apache allows at the same time. The default is set to 150, which is reasonable for many web servers.

MaxClients: This value does more or less the same as the ServerLimit setting. Make sure both have the same value.

KeepAlive: Use this to allow clients to open persistent connections. For performance reasons, ordinarily it is a good idea to do that, and therefore the default value for this option is On.

KeepAliveTimeout: This is the number of seconds that a keepalive connection is kept open when no new traffic comes in. The default is 15 seconds.

Was this article helpful?

0 0

Post a comment