I am setting up a small VPS. My plan is to have nginx as a reverse proxy
to apache2 (running with mod-php). All other static files will be served
by nginx.
Does anyone know if there would be a significant difference in
performance and/or stability if I removed apache, and have nginx use
fcgi for php?
I am setting up a small VPS. My plan is to have nginx as a reverse
proxy to apache2 (running with mod-php). All other static files will
be served by nginx.
Does anyone know if there would be a significant difference in
performance and/or stability if I removed apache, and have nginx use
fcgi for php?
Yes, you’d save hundreds of megabytes of RAM by not using Apache, which
will undoubtedly affect performance in a positive fashion.
performance and/or stability if I removed apache, and have nginx use
fcgi for php?
Yes, you’d save hundreds of megabytes of RAM by not using Apache, which
will undoubtedly affect performance in a positive fashion.
Would not these megabytes go to php/FastCGI ?
Not really. PHP under FastCGI seems to use a lot less resources than
mod_php. I assume this is because the number of threads is a constant
with PHP under FCGI.
I converted a Joomla site from Apache/mod_php to Nginx/FastCGI and went
from constantly consuming the full 256MB (and crashing the VPS) to using
only around 20MB of RAM.
Apache and PHP would still exhaust the 256MB RAM in the VPS once a week
or so and force a restart of the entire VPS. Someone suggested that
using FastCGI with Apache might help, but I never got around to trying
it before switching the site over to Nginx.
On Fri, May 15, 2009 at 12:48:28AM -0700, Cliff W. wrote:
Does anyone know if there would be a significant difference in
with PHP under FCGI.
I converted a Joomla site from Apache/mod_php to Nginx/FastCGI and went
from constantly consuming the full 256MB (and crashing the VPS) to using
only around 20MB of RAM.
Apache using PHP FastCGI uses a ton less memory than mod_php. Granted
I
have 1GB of RAM serving 6 drupal sites, but with one site, it would
definitely take less than 256 MB
Thanks to everyone for taking your time in replying.
My question was asked my Igor: how about the FastCGI php processes?
Would the difference be really that significant if nginx is serving all
non-php requests? In which case, apache doesn’t need many modules?
Cliff W. Wrote:
I converted a Joomla site from Apache/mod_php to
Nginx/FastCGI and went
from constantly consuming the full 256MB (and
crashing the VPS) to using
only around 20MB of RAM.
@Cliff
was your joomla site using nginx proxy before you converted to
Nginx/FastCGI?
Thanks to everyone for taking your time in replying.
My question was asked my Igor: how about the FastCGI php processes?
Would the difference be really that significant if nginx is serving
all non-php requests? In which case, apache doesn’t need many modules?
It’s not the modules that make Apache bloat, it’s the threads. On the
site I mentioned, I removed almost every module I could. It didn’t
help.
Cliff
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.