Search iEntry News

UnixProNews
SecurityProNews
ITmanagement








Performance Tuning Apache For Heavy Loads

By Michael Marr
Expert Author
Article Date: 2010-09-21

Apache provides a small article on general performance tuning, and it breaks issues down between Hardware/OS, Run-Time Configuration, and Compile Configuration. In many practical applications, you may not have the budget to control hardware resources, and typically we run into performance problems after Apache is already compiled and running. Thus, focusing in on the various configuration options available to boost performance is appropriate for most cases.

Let's see what we can do:

MaxClients

MaxClients determines the number of request being handled at any given point in time. Apache recommends that you set this to a number that doesn't require the swapping (sharing) of memory. When your max clients is above the threshold that your memory can handle, a request will have to wait for available memory, and thus appear to be abnormally slow. Ideally, you'll want to maximize the number of requests that can be handled without causing swapping/sharing of memory between multiple requests. This largely depends on your memory usage, and thus should be determined by monitoring of your own server and testing various settings.

MaxSpareServers, MinSpareServers

The spare servers directives control how many idle child processes there can be. This should only be modified for busy sites. If your site is busy, and you have not tweaked this setting, you'll find your Apache killing a lot of idle processes (those above the MaxSpareServers directive) only to almost immediately restart them when a new request comes in. Boosting both of these directives from their defaults of 10 and 5 respectively will decrease resources being used to start/stop processes, and thus boost performance.

StartServers

Similar to the spare server directives above, however, this directive controls how many child processes are initiated at startup. Unless you are a busy site, you won't need to adjust this above the default. However, going above the default of 3 would provide a performance boost when the server starts and is immediately in need of more than the default amount.

If your server is getting an increasing amount of traffic, and you lack the immediate funds to upgrade your hardware, the above commands should get you started in the right direction.



About the Author:
Michael Marr is a IT staff Writer for WebProNews.



Newsletter Archive | Article Archive | Submit Article | Advertising Information | Resources | About Us | Contact

UnixProNews is an iEntry, Inc. ® publication - All Rights Reserved Privacy Policy and Legal