Optimize your hosting server

A quick info of how you can optimize your hosting server if you are using a LAMP (Linux Apache Mysql PHP) environment.

I am keeping the info for reference, I will also try to update it but please not that’s not a complete list. Please comment if you have any opinions

1. use php as a fcgi module not as a dso module for apache
2. compile apache with mpm (Multi-Processing Module) worker that is capable to serve a large number of requests with less system resources than a process-based server.
3. use php eaccelerator it’s proven to be faster than apc and other cache systems
tweak it based on http://eaccelerator.net/wiki/Settings

that’s basically it 🙂

now some configuration parameters:
1. don’t use SymLinksIfOwnerMatch in your httpd.conf a lstat system call is made for each directory and it’s not cached
2. Tune MinSpareServers and MaxSpareServers so that Apache need not spawn more than 4 child processes per second (Apache can spawn a maximum of 32 child processes per second). When more than 4 children are spawned per second, a message will be logged in the ErrorLog.

to be continued…