|
Saturday 06 May 2006 12:20:59 pm
Comment53217
@Xavier Dutoit I did no benchmarks. It's my opinion, based on running unix "top" utility. With apache + mod_php the average load was 4-5. With nginx + FCGI the average load was about 2-3. Futhermore, with apache + mod_php server could go to infinit swapping after viewcache reset. For example, you can get 20 requests to the same page (without cache). That causes 20 (!) processes to build cache for the single page. With apache you can really go out of resources. I had such situation several times. About compatibility - yes, everything works for me, I didn't find any differences at all. @Gabriel Ambuehl You are almost right. But don't forget, that I've changes webserver software too. For example nginx can hold 10 000 keepalive connections and require only 2.5 mb memory for it. Changing only php mode will help a lot, but will not completely solve the problem. You'd better to change the webserver too. Apache makes additional process for every new keepalive connection. That require too many memory. The rude model of server overload can be decribed with this steps:
1. You get too many requests, requiring to rebult cache
2. CPU goes down :)
3. Too many copies of apache
4. Lack of memory
5. Swapping (and even more load to CPU)
6. Lack of swapping space (sometime) 7. bye-bye :) FCGI will help you with (2), but will not help with (3,4). To resolve (3,4) you must change apache to nginx, lighttpd, zeus and so on. @ALL Just a notice. If you use static cache, and CPU load is less than 1, then you don't need such uprgade. That helps only with peak loads. If you don't youse static cache, and CPU load can be >1, then software upgrade can give a great help. In situiation, when viewcache is already build, nginx+FCGI will not get you advantage in speed, but anyway, it will save a lot of memory. You will be able to give more memory for mysql, for example, instead of wasting memory for apache+mod_php
|