Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using mod_php with Apache IS faster than PHP-FPM, however, it uses MUCH more RAM. In a RAM constrained environment like a VPS, it simply isn't an option.


The latter part is simply not true - I run Apache with mod_php for a number of sites and web services on VPS's with little RAM without any problems, and that's alongside MySQL, Exim and SpamAssassin.


What's the traffic though?


I don't have exact figures, but each site probably gets a few hundred hits/day, and the mail server probably gets hit every few seconds. The OP made a sweeping "not an option" statement though, not "on a popular site hosted on a VPS".


Let me re-phrase. Using Apache + mod_php in a RAM constrained environment is not an option on any site that receives more than a dozen requests per second, assuming proper configuration. However, that figure is unbelievably limiting. The site can't be used for anything other than a very low traffic internal site or a dead blog. Even a tiny spike in traffic will destroy your setup. If you switch to Apache + PHP-FPM you can increase your capacity 10X with the same hardware. Literally. Most resources on a website are static and loading PHP for all of them is a pointless waste of RAM.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: