Apache Tuning

Enable Mod Expires
Drupal states via .htaccess that if mod_expires is on, it caches all files for 2 weeks. This means that the browser would cache static content.

Set KeepAlive On For Apache to wait until all the elements of a page requests are provided.

MaxKeepAliveRequests -> How many download requests per page.. [Check with Firebug]

KeepAliveTimeOut 15 --> How many seconds required for the page to load completely in the browser. 4 sec is a good threshold.

MaxClients --> No of processes to start. Per page request. Check the VIRT and RES column in top command. VIRT is physical RAM and Swap space for processes and RES is physical RAM.

Use the following command to know the memory used by apache in ubuntu: use ps tool: ps aux | egrep apache . Check the VIRT and RES column for memory.

Memory that can be provided to Apache for handling client requests:
MaxClients for Apache = ( Total Memory Location that can be given to Apache in the server based on RAM available and other processes provisioned) / ( Avg Resident memory per Apache Process)

Enable mod_status to monitor apache processes

Change AllowOverride None to AllowOverride All to allow .htaccess file change the configuration for drupal installation in apache config file.

--
Based on Lullabot Videos

Technologies: