Spiga

Apache Optimization : Simple techniques

With the increase in the number of clients using the webserver it becomes an important step to optimize the normal webserver to its best to gain performance and to make efficient use of the resources. By default Apache does provide you with a few keywords which when used to its best can yield maximum usage of resources.

1. RLimitMem

Normally the apache server will be using the memory limits specified by the operating system although you will find it comparatively less or at some occasions huge memory limits being used. We will be able to set the memory usage by the apache server on a particular machine using the RLimitMem value set properly. The property is available right from apache 1.2 and is most effective while you find apache server using more server resources that it should be.

The RLimitMem takes up two arguments to define the minimum soft resource limit and the maximum resource limit. It takes up values in bytes or you can use the keyword 'max' which will make it access the maximum memory slot available through the operating system.

RLimitMEM 1048576 2097152

should be ideal for a large server. Please note that once you keep the clause as max and you wish to update the memory usage you will need to login as root or to edit the details on startup phase.

Again, the limit will be applicable to all the processes that are forked out of the main process, this should include the CGI and SSI exec programs, but this limit will stand invalid for main apache processes like logging of stats.

0 comments: