On Tue, Aug 26, 2008 at 10:44 AM, howard chen howachen@gmail.com wrote:
I was heard that wikipedia is running on Apache/mod_php, are there any reason not to use fast-cgi approach for performance (e.g. lighty / ngnix + fast cgi?)
The reason that mod_php is slow is because you have to have an instance of PHP running when much if not most of the time, Apache is waiting to serve results to slow clients. This means that you have many more instances of PHP than you actually need, which means much more memory. In Wikipedia's case, however, Apache is serving data exclusively to Squid, which is reading the data at least as fast as it can write it. It wouldn't save anything to have FastCGI serve data to lighttpd or nginx instead; it would be no faster than mod_php serving it to Squid. So little to nothing would be saved by using FastCGI.